//
//  LuruViewController.swift
//  BusinessIOS
//
//  Created by Rain on 2018/12/27.
//  Copyright © 2018 XingJian Li. All rights reserved.
//

import UIKit
import Photos
import Alamofire

struct xiangmuModel:HandyJSON {


    var agreementAmount:String?
    var areaCovered:String?
    var buildApprove:String?
    var buildApproveRemark:String?
    var buildCovered:String?
    var businessRegist:String?
    var businessRegistRemark:String?
    var buttSituation:String?
    var caFuName:String?
    var caName:String?
    var capitalAttractor:String?
    var compAccepReport:Array<Any>?
    var completePercent:String?
    var completeWorkPercent:String?
    var coopePhone:String?
    var createtime:String?
    var departmentName:String?
    var employNum:String?
    var environmentApprove:String?
    var environmentApproveRemark:String?
    var existCapital:String?
    var existCapitalProve:Array<Any>?
    var fixedAssetExistCapital:String?
    var fixedAssetYearExistCapital:String?
    var ganOutVal:String?
    var impLevel:String?
    var inChina:String?
    var industryCategoryId:String?
    var investmentBook:Array<Any>?
    var investLevel:String?
    
    var investorAddressCity:String?
    var investorAddressCityId:String?
    var investorAddressCountry:String?
    
    var investorAddressCountryId:String?
    
    var investorAddressProvince:String?
    var investorAddressProvinceId:String?
    
    var investorName:String?
    var landApprove:String?
    var landApproveRemark:String?
    var linkManArray:Array<Any>?
    var linkName:String?
    var newsReport:Array<Any>?
    
    
    var obtainNum:String?
    var outChinaAddress:String?
    var outputValue:String?
    var performTime:String?
    var planApprove:String?
    var planApproveRemark:String?
    
    var productOfflinePhoto:Array<Any>?
    var projectAdvPlan:String?
    var projectApprove:String?
    var projectApproveRemark:String?
    var projectAreaProvince:String?
    var projectBuildAddr:String?
    var projectContent:String?
    var projectIntro:String?
    var projectLevel:String?
    
    
    var projectName:String?
    var projectNum:String?
    var projectRealPhoto:Array<Any>?
    var projectReferee:String?
    var projectRefereeTelphone:String?
    var projectSpeed:String?
    var projectStage:String?
    var putIntoProductTime:String?
    var questionDesp:String?
    
    var signPicture:Array<Any>?
    var signTime:String?
    var startLicence:Array<Any>?
    var startRite:Array<Any>?
    
    var startTime:String?
    var taxTotalVal:String?
    var topOfWorld:String?
    var unitAddress:String?
    var unitLeader:String?
    
    
    var unitName:String?
    
    var unitPropert:String?
    var yearExistCapital:String?
    var yearTaxTotal:String?
    
}

class XiangMuLuRuBanliViewController: UIViewController{
    
    var numIdString : String!
    var informationRecordId : String!
    var deploymentName : String!
    
    var taskId : String!
    
    var tableView: UITableView!
    
    var luruButton:UIButton!
    
    
    var DubanButton:UIButton!
    
    var LishiButton:UIButton!
    
    
    
    var quedingButton:UIButton!
    
    var bohuiButton:UIButton!
    
    
    
    var xiangmuString:String!
    
    var xiangmuStrings:String!
    
    
    var guoneiString:String!
    
    
    var guoneitouzidizhiString:String!
    
    var wubaiString:String!
    
    
    var gengxinString:String!
    
    var gengxinStrings:String!
    
    var tuisong:String!
    
    
    var shinei:String!
    
    
    var xingzhi:String!
    var xingzhis:String!
    
    
    
    var danweidizhi:String!
    
    
    var qianyueStrig:String!
    var qianyueStrigs:String!
    
    
    var chnayeleibieStrig:String!
    
    var chnayeleibieStrigs:String!
    
    
    var gongshangqingkuangStrig:String!
    var gongshangqingkuangStrigs:String!
    
    var lixiangshenpiStrig:String!
    var lixiangshenpiStrigs:String!
    
    
    var huanbaoshenpiStrig:String!
    var huanbaoshenpiStrigs:String!
    
    
    var yongdishenpiStrig:String!
    var yongdishenpiStrigs:String!
    
    var guihuashenpiStrig:String!
    var guihuashenpiStrigs:String!
    
    
    
    var jiansheshenpiStrig:String!
    
    var jiansheshenpiStrigs:String!
    
    
    var namestring:String!
    
    var photostring:String!
    
    var banlirenid:String!
    
    var banlirenids:String!
    
    var shenpinamestring:String!
    
    var shenpiphotostring:String!
    
    var shenpirenid:String!
    
    
    //0区
    var xiangmumingchengString:String!
    
    var xiangmumingchengStrings:String!
    
    
    
    
    var xiangmujianjieString:String!
    
    var xiangmujianjieStrings:String!
    
    var duijieqingkuangString:String!
    
    var duijieqingkuangStrings:String!
    
    
    
    
    //1区
    var xiangmufangmingziString:String!
    var xiangmufangmingziStrings:String!
    
    
    var guowaidizhiString:String!
    var guowaidizhiStrings:String!
    
    
    var xiangmufanglianxirenString:String!
    var xiangmufanglianxirenStrings:String!
    
    var xiangmufangdianhuaString:String!
    var xiangmufangdianhuaStrings:String!
    
    //2区
    var shineixiangmumingchengString:String!
    var shineixiangmumingchengStrings:String!
    
    var shineidanweifuzerenString:String!
    var shineidanweifuzerenStrings:String!
    
    var shineilianxirenString:String!
    var shineilianxirenStrings:String!
    
    var shineilianxirendianhuaString:String!
    var shineilianxirendianhuaStrings:String!
    
    var shineiyindaorenString:String!
    var shineiyindaorenStrings:String!
    
    var shineiyindaorendianhuaString:String!
    var shineiyindaorendianhuaStrings:String!
    //3区
    var xiangmuwentimiaoshuString:String!
    var xiangmuwentimiaoshuStrings:String!
    
    var xiangmushengshixianString:String!
    
    
    var xiangmushengshixianStrings:String!
    
    var xiangmubumenmingchengString:String!
    var xiangmubumenmingchengStrings:String!
    
    
    var xiangmuxieyitouzieString:String!
    var xiangmuxieyitouzieStrings:String!
    
    var xiangmujianshejibenString:String!
    var xiangmujianshejibenStrings:String!
    
    var xiangmujianshediString:String!
    var xiangmujianshediStrings:String!
    
    var xiangmutouzixieyishuString:String!
    var xiangmutouzixieyishuStrings:String!
    
    var xiangmulvxingshijianString:String!
    var xiangmulvxingshijianStrings:String!
    
    var xiangmuleijidaoweizijinString:String!
    var xiangmuleijidaoweizijinStrings:String!
    
    
    var xiangmudangniandaoweizijinString:String!
    var xiangmudangniandaoweizijinStrings:String!
    
    var xiangmunaruleijidaoweizijinString:String!
    var xiangmunaruleijidaoweizijinStrings:String!
    
    var xiangmunarudangniandaoweizijinString:String!
    var xiangmunarudangniandaoweizijinStrings:String!
    
    var xiangmudaoweizijincailiaoString:String!
    var xiangmudaoweizijincailiaoStrings:String!
    
    
    //4区
    
    var gongshangpifuString:String!
    var gongshangpifuStrings:String!
    
    var lixiangpifuString:String!
    var lixiangpifuStrings:String!
    
    var huanbaopifuString:String!
    var huanbaopifuStrings:String!
    
    var yongdipifuString:String!
    var yongdipifuStrings:String!
    
    var guihuapifuString:String!
    var guihuapifuStrings:String!
    
    
    var jianshepifuString:String!
    var jianshepifuStrings:String!
    
    //5区
    var xiangmuwanchengniandujihuaString:String!
    var xiangmuwanchengniandujihuaStrings:String!
    
    var xiangmuwanchengniandushiwujihuaString:String!
    var xiangmuwanchengniandushiwujihuaStrings:String!
    
    var xiangmuwanchenggongchengString:String!
    var xiangmuwanchenggongchengStrings:String!
    
    var xiangmutuijinjihuaString:String!
    var xiangmutuijinjihuaStrings:String!
    
    var xiangmukaigongshijianString:String!
    var xiangmukaigongshijianStrings:String!
    
    var xiangmukaigongxukezhengString:String!
    var xiangmukaigongxukezhengStrings:String!
    
    //6区
    var xiangmuzongzhandimianjiString:String!
    var xiangmuzongzhandimianjiStrings:String!
    
    var xiangmuzongjianzhumianjiString:String!
    var xiangmuzongjianzhumianjiStrings:String!
    
    var xiangmutouziqiangduString:String!
    var xiangmutouziqiangduStrings:String!
    
    var xiangmujiuyerenshuString:String!
    var xiangmujiuyerenshuStrings:String!
    
    var xiangmunianzongchanzhiString:String!
    var xiangmunianzongchanzhiStrings:String!
    
    var xiangmunianshangshuifeizongeString:String!
    var xiangmunianshangshuifeizongeStrings:String!
    
    var xiangmutouchanshijianString:String!
    var xiangmutouchanshijianStrings:String!
    
    var xiangmujungongyanshouString:String!
    var xiangmujungongyanshouStrings:String!
    
    //7区
    var touchanhoujiuyerenshu:String!
    
    var touchanhoujiuyerenshus:String!
    
    
    var touchannianchanzongzhi:String!
    var touchannianchanzongzhis:String!
    
    var nianshangshuifeizonge:String!
    var nianshangshuifeizonges:String!
    
    
    
    var guojia: NSInteger!
    
    
    var touzifangguojiadizhi: String!
    
    
    var shifoutuisong:String!
    var shifoutuisongs:String!
    
    
    
    
    
    var Photoimages = [Any]()
    var Besa64Photoimage = [String]()
    var Besa64Photoimages = [String]()
    
    
    
    
    var xinwenimages = [Any]()
    var Besa64xinwenimage = [String]()
    var Besa64xinwenimages = [Any]()
    
    
    
    var chanpinimages = [Any]()
    var Besa64chanpinimage = [String]()
    var Besa64chanpinimages = [String]()
    
    
    
    var kaigongimages = [Any]()
    var Besa64kaigongimage = [String]()
    var Besa64kaigongimages = [String]()
    
    
    
    var xiangmuPhotoimages = [Any]()
    var Besa64xiangmuPhotoimage = [String]()
    var Besa64xiangmuPhotoimages = [String]()
    
    
    var touzifangshenID:String!
    var touzifangshenIDs:String!
    var touzifangshenName:String!
    
    var touzifangshiID:String!
    var touzifangshiIDs:String!
    var touzifangshiName:String!
    
    
    var touzifangxianID:String!
    var touzifangxianIDs:String!
    var touzifangxianName:String!
    
    
    
    
    var hezuofangshenName:String!
    
    
    var hezuofangshenID:String!
    
    
    var guoneishenID:String!
    var guoneishiID:String!
    
    var guoneixianID:String!
    
    
    
    
    
    var shifouwubaiqingString:String!
    var shifouwubaiqingStrings:String!
    
    
    var shineixiangmuhezuofangString:String!
    var shineixiangmuhezuofangStrings:String!
    
    
    
    var tuisongnamestring:String!
    var tuisongphotostring:String!
    var tuisongrenid:String!
    
    var tuisongrenids:String!
    
    
    var wentinamestring:String!
    var wentiphotostring:String!
    var wentirenid:String!
    
    var wentirenids:String!
    
    var bohuiString:String!
    
    
    var nameArray : [String] = ["项目进度","项目名称","项目简介","对接情况"]
    
    var xiangmutouzifangArray : [String] = ["投资方名称/姓名","是否国内","国内投资方地址","联系人","是否500强"]
    
    var shineihezuofangArray : [String] = ["项目合作方","单位名称","单位性质","单位地址","单位负责人","联系人","联系电话","项目引荐人","引荐人电话"]
    var jinzhanArray : [String] = ["问题描述","省市县","部门名称","签约时间","协议投资额(万元)","产业类别","项目建设基本内容","项目建设地","签约照片","","新闻报道","","投资协议书","履行时间","累计到位资金","当年到位资金","纳入固定资产投资统计累计到位资金","纳入固定资产投资统计当年到位资金","到位资金证明材料"]
    var qingkuangArray : [String] = ["工商登记情况","批复文号","立项审批","批复文号","环保审批情况","批复文号","用地审批情况","批复文号","规划审批情况","批复文号","建设审批情况","批复文号"]
    var xiangmujiansheArray : [String] = ["完成年度投资计划百分比","完成年度实物工程量计划百分比","工程进度","项目推进计划","开工时间","开工许可证","开工仪式照片","","项目进度实景照片",""]
    
    var yuguxiaoyiArray : [String] = ["总占地面积","总建筑面积","投资强度","就业人数","年总产值","年上缴税费总额","投产时间","竣工验收报告","产品下线照片",""]
    
    var shijixiaoyiArray : [String] = ["就业人数","年产总值","年上缴税费总额","更新时间","是否可行"]
    
    
    var shifouduanban:String!
    
    //办理人
    @objc func namephoto(nofi : Notification){
        self.namestring = nofi.userInfo!["name"] as? String
        self.photostring = nofi.userInfo!["photo"] as? String
        
        self.banlirenid = nofi.userInfo!["id"] as? String
        self.tableView.reloadData()
    }
   
    
    
    @objc func touzifangNotification(nofi : Notification){
        self.touzifangshenID = nofi.userInfo!["shenID"] as? String
        self.touzifangshenName = nofi.userInfo!["shenName"] as? String
        
        self.touzifangshiID = nofi.userInfo!["shiID"] as? String
        self.touzifangshiName = nofi.userInfo!["shiName"] as? String
        
        
        self.touzifangxianID = nofi.userInfo!["xianID"] as? String
        self.touzifangxianName = nofi.userInfo!["xianName"] as? String
        
        
        self.tableView.reloadData()
    }
    
    
    @objc func hezuofangNotification(nofi : Notification){
        
        self.hezuofangshenID = nofi.userInfo!["shenID"] as? String
        self.hezuofangshenName = nofi.userInfo!["shenName"] as? String
        
        
        
        
        self.tableView.reloadData()
        
    }
    
    
    deinit {
        /// 移除通知
        NotificationCenter.default.removeObserver(self)
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        NotificationCenter.default.addObserver(self, selector: #selector(namephoto), name: NSNotification.Name(rawValue:"issTest"), object: nil)
        
        
        
        
        
        NotificationCenter.default.addObserver(self, selector: #selector(touzifangNotification), name: NSNotification.Name(rawValue:"touzifang"), object: nil)
        
        
        NotificationCenter.default.addObserver(self, selector: #selector(hezuofangNotification), name: NSNotification.Name(rawValue:"hezuofang"), object: nil)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        
        
        
        self.title = "项目跟踪"
        
        self.view.backgroundColor = UIColor.white
        tableView = UITableView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height - 49 - 40 - 40), style: .plain )
        tableView.dataSource = self
        tableView.delegate = self
        tableView.separatorInset = UIEdgeInsets.zero
        //        tableView.separatorStyle = .none
        tableView.backgroundColor = bgGrayColor
        tableView.showsHorizontalScrollIndicator = false
        tableView.showsVerticalScrollIndicator = false
        //tableView.contentInset = UIEdgeInsetsMake(-20, 0, 0, 0)//去除表格上放多余的空隙
        //tableView.tableHeaderView = UIView.init()
        tableView.tableFooterView = UIView.init()
        self.view.addSubview(tableView)
        
        
        
        
        
        
        
        self.luruButton = UIButton()
        //背景颜色
        self.luruButton.frame = CGRect(x: 10, y: self.view.frame.size.height - 49 - 40 - 40 , width: self.view.frame.size.width - 20, height: 40)
        self.luruButton.backgroundColor = UIColor.blue
        self.luruButton.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        self.luruButton.setTitle("确认", for: .normal )

        
        self.luruButton.addTarget(self,action:#selector(luruButtonClick), for: .touchUpInside)
        self.view.addSubview(self.luruButton)
        
        
        self.DubanButton = UIButton()
        //背景颜色
        self.DubanButton.frame = CGRect(x: 0, y: self.view.frame.size.height - 49 - 40  , width: self.view.frame.size.width / 2 - 1, height: 40)
        self.DubanButton.backgroundColor = UIColor.groupTableViewBackground
        self.DubanButton.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        self.DubanButton.setTitle("督办", for: .normal )
        self.DubanButton.setTitleColor(UIColor.gray, for: .normal)
 
        self.DubanButton.addTarget(self,action:#selector(dubanButtonClick), for: .touchUpInside)
        self.view.addSubview(self.DubanButton)
        
        
        
        self.LishiButton = UIButton()
        //背景颜色
        self.LishiButton.frame = CGRect(x: self.view.frame.size.width / 2 + 1, y: self.view.frame.size.height - 49 - 40, width: self.view.frame.size.width / 2 - 1, height: 40)
        self.LishiButton.backgroundColor = UIColor.groupTableViewBackground
        self.LishiButton.setTitleColor(UIColor.blue, for: .normal)
        self.LishiButton.titleLabel?.font = UIFont.systemFont(ofSize: 15)
      
        self.LishiButton.setTitle("历史问题", for: .normal )
   

        self.LishiButton.addTarget(self,action:#selector(lishiButtonClick), for: .touchUpInside)
        self.view.addSubview(self.LishiButton)
        
        
        
        
      
        self.quedingButton = UIButton()
      
        self.quedingButton.frame = CGRect(x: 0, y: self.view.frame.size.height - 49 - 40 - 40 - 1, width: self.view.frame.size.width / 2 , height: 40)
        self.quedingButton.backgroundColor = UIColor.groupTableViewBackground
        self.quedingButton.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        self.quedingButton.setTitle("确定", for: .normal )
        self.quedingButton.setTitleColor(UIColor.gray, for: .normal)
        
                            self.quedingButton.addTarget(self,action:#selector(quedingButtonClick), for: .touchUpInside)
        self.view.addSubview(self.quedingButton)
        
        
        
        self.bohuiButton = UIButton()

        self.bohuiButton.frame = CGRect(x: self.view.frame.size.width / 2 + 1, y: self.view.frame.size.height - 49 - 40 - 40 - 1  , width: self.view.frame.size.width / 2 - 1, height: 40)
        self.bohuiButton.backgroundColor = UIColor.groupTableViewBackground
        self.bohuiButton.setTitleColor(UIColor.blue, for: .normal)
        self.bohuiButton.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        
        self.bohuiButton.setTitle("驳回", for: .normal )
        
        
                            self.bohuiButton.addTarget(self,action:#selector(bohuiButtonClick), for: .touchUpInside)
        self.view.addSubview(self.bohuiButton)
        
        
        
        
        tableView.register(NSClassFromString("LuruTextFirldTableViewCell"), forCellReuseIdentifier: "LuruTextFirldTableViewCell")
        
        
        
        
        tableView.register(NSClassFromString("lianxirenTableViewCell"), forCellReuseIdentifier: "lianxirenTableViewCell")
        
        tableView.register(NSClassFromString("xiangmujinduTableViewCell"), forCellReuseIdentifier: "xiangmujinduTableViewCell")
        
        
        tableView.register(NSClassFromString("banlirenTableViewCell"), forCellReuseIdentifier: "banlirenTableViewCell")
        
        
        
        
        tableView.register(NSClassFromString("PhotoCellTableViewCell"), forCellReuseIdentifier: "PhotoCellTableViewCell")
        
        
        tableView.register(NSClassFromString("PhotoImageViewCell"), forCellReuseIdentifier: "PhotoImageViewCell")
        
        tableView.register(NSClassFromString("xinwenImageViewTableViewCell"), forCellReuseIdentifier: "xinwenImageViewTableViewCell")
        
        
        tableView.register(NSClassFromString("chanpinxiaxianTableViewCell"), forCellReuseIdentifier: "chanpinxiaxianTableViewCell")
        
        
        tableView.register(NSClassFromString("kaigongyishiTableViewCell"), forCellReuseIdentifier: "kaigongyishiTableViewCell")
        
        tableView.register(NSClassFromString("xiangmuPhotoTableViewCell"), forCellReuseIdentifier: "xiangmuPhotoTableViewCell")
        
        
        
        self.loadDate()
        
    }
    func loadDate()  {
        
        
        let manager = UserDefaults()
        
        
        let token: String? = manager.string(forKey:"tokens")  //根据关键字取值
        
        let bohuiurlString = "http://wwwqjzsyzcscom.aykj.net.cn/api/definition/calReturn"
        
        
         let bohuijson = "{\"informationRecordId\":\"\(self.informationRecordId!)\",\"token\":\"\(token!)\",\"taskId\":\"\(self.taskId!)\"}"
        
        let bohuiurl = URL(string: bohuiurlString)!
        let bohuijsonData = bohuijson.data(using: .utf8, allowLossyConversion: false)!
        
        var bohuirequest = URLRequest(url: bohuiurl)
        bohuirequest.httpMethod = HTTPMethod.post.rawValue
        bohuirequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
        bohuirequest.httpBody = bohuijsonData
        
        Alamofire.request(bohuirequest).responseJSON {(response) in
            
            
            
            if response.result.isSuccess {
                
                let json = JSON(response.data!)
                print("shifoubohui====\(json["message"])")
                
                self.bohuiString = json["message"].string
                
                
                if self.bohuiString == "可以驳回!"{
                    self.luruButton.isHidden = true
                   
                    self.quedingButton.isHidden = false
                    self.bohuiButton.isHidden = false
                    
                }else{
                    self.luruButton.isHidden = false
                    self.quedingButton.isHidden = true
                    self.bohuiButton.isHidden = true
                }
                
            }
 
        }
        
        
        
        
        
        
        let dubanurlString = "http://wwwqjzsyzcscom.aykj.net.cn/api/supervisenotice/judge"
        
        let dubanjson = "{\"informationRecordId\":\"\(self.informationRecordId!)\",\"token\":\"\(token!)\"}"
        
        
        
        let dubanurl = URL(string: dubanurlString)!
        let dubanjsonData = dubanjson.data(using: .utf8, allowLossyConversion: false)!
        
        var dubanrequest = URLRequest(url: dubanurl)
        dubanrequest.httpMethod = HTTPMethod.post.rawValue
        dubanrequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
        dubanrequest.httpBody = dubanjsonData
        
        Alamofire.request(dubanrequest).responseJSON {(response) in
            
            if response.result.isSuccess {
                
                let json = JSON(response.data!)
                self.shifouduanban = json["code"].string
             
            }
            
            if self.shifouduanban == "fail"{
                self.DubanButton.isEnabled = false
            }else{
                self.DubanButton.isEnabled = true
            }
            
        }
        
        
        
        
        
        
        let urlString = "http://wwwqjzsyzcscom.aykj.net.cn/api/informationRecord/onceObject"
        
        let json = "{\"informationRecordId\":\"\(self.informationRecordId!)\",\"taskId\":\"\(self.numIdString!)\"}"
        
   
        
        let url = URL(string: urlString)!
        let jsonData = json.data(using: .utf8, allowLossyConversion: false)!
        
        var request = URLRequest(url: url)
        request.httpMethod = HTTPMethod.post.rawValue
        request.setValue("application/json", forHTTPHeaderField: "Content-Type")
        request.httpBody = jsonData
        
        Alamofire.request(request).responseJSON {(response) in
        
        print("response==\(response)")
            
            if response.result.isSuccess {
                
                
                let jsons = JSON(response.data!)["resultData"].dictionary
                
                let model = xiangmuModel.deserialize(from: jsons)
                
                
                
                let json = JSON(response.data!)
                let dics = json["resultData"].dictionary
              
                
                let linkdic = dics!["linkManArray"]![0].dictionary
                
            
                
//                //项目方联系人"linkmans":
                self.xiangmufanglianxirenString = linkdic!["linkman"]?.string
                
//
//                //项目方联系电话 "telphones":
                self.xiangmufangdianhuaString = linkdic!["telphone"]?.string
                
                
//                print("1========\(model)")
                //协议投资额 "agreementAmount":
                self.xiangmuxieyitouzieString = (model?.agreementAmount)!
                
            
              
                //总占地面积(亩) "areaCovered":
                self.xiangmuzongzhandimianjiString = (model?.areaCovered)!
                //建设审批情况 "buildApprove":
               self.jiansheshenpiStrig = (model?.buildApprove)!
                //建设审批情况状态情况"buildApproveRemark":
                self.jianshepifuString = (model?.buildApproveRemark)!
                
                //总建筑面积(万平方米)"buildCovered":
                self.xiangmuzongjianzhumianjiString = (model?.buildCovered)!
                
                //工商登记情况"businessRegist":
                self.gongshangqingkuangStrig = (model?.businessRegist)!
                //工商登记情况状态情况"businessRegistRemark":
                self.gongshangpifuString = (model?.businessRegistRemark)!
                
                //对接情况"buttSituation":
                self.duijieqingkuangString = (model?.buttSituation)!
                //项目合作方  第三区"capitalAttractor":
                self.shinei = (model?.capitalAttractor)!
                
                
                
           
                
                
                //竣工验收报告//            "compAccepReport":
//                self.xiangmujungongyanshouStrings! = (model?.compAccepReport)!
                
                
                //项目建设进度//完成年度投资计划百分比"completePercent":
                self.xiangmuwanchengniandujihuaString = (model?.completePercent)!
                
                //完成年度实物工程量计划百分比"completeWorkPercent":
                 self.xiangmuwanchengniandushiwujihuaString = (model?.completeWorkPercent)!
                //联系电话"coopePhone":
                self.shineilianxirendianhuaString = (model?.coopePhone)!
                
                
                //更新时间self.gengxinStrings!"createtime":
                self.gengxinString = (model?.createtime)!
                //部门名称"departmentName":
                self.xiangmubumenmingchengString = (model?.departmentName)!
                //就业人数"employNum":
                self.xiangmujiuyerenshuString = (model?.employNum)!
                
                //环保审批情况"environmentApprove":
                self.huanbaoshenpiStrig = (model?.environmentApprove)!
                //环保审批情况状态情况"environmentApproveRemark":
                self.huanbaopifuString = (model?.environmentApproveRemark)!
                //累计到位资金(万元)"existCapital":
                self.xiangmuleijidaoweizijinString = (model?.existCapital)!
                
                
                //到位资金证明材料
//                "existCapitalProve":"[]"
                //纳入固定资产投资统计累计到位资金(万元) "fixedAssetExistCapital":
               self.xiangmunaruleijidaoweizijinString = (model?.fixedAssetExistCapital)!
                
                //纳入固定资产投资统计当年到位资金(万元) "fixedAssetYearExistCapital":
               self.xiangmunarudangniandaoweizijinString = (model?.fixedAssetYearExistCapital)!
                //年产总值"ganOutVal":
                self.touchannianchanzongzhi = (model?.ganOutVal)!
                
                //是否国内"inChina":
                self.guoneiString = (model?.inChina)!
                
                
                
                if self.guoneiString == "1"{
        
                    self.guoneiString  = "国内"
                    self.touzifangguojiadizhi = self.guoneitouzidizhiString
                }else{
        
                    
                    self.touzifangguojiadizhi = self.guowaidizhiString
                }
                
                //产业类别"industryCategoryId":
                self.chnayeleibieStrig = (model?.industryCategoryId)!
                
                
                if self.chnayeleibieStrig == "1" {
                    self.chnayeleibieStrig = "高原特色农业和生物资源深加工产业"
                }else if self.chnayeleibieStrig == "2" {
                    self.chnayeleibieStrig = "有色金属深加工和液态金属产业"
                }else if self.chnayeleibieStrig == "3" {
                    self.chnayeleibieStrig = "军民融合现代装备制造产业"
                }else if self.chnayeleibieStrig == "4" {
                    self.chnayeleibieStrig = "精细化工产业"
                }else if self.chnayeleibieStrig == "5" {
                    self.chnayeleibieStrig = "现代商贸物流产业"
                }else if self.chnayeleibieStrig == "6" {
                    self.chnayeleibieStrig = "文化旅游和高原体育产业"
                }else if self.chnayeleibieStrig == "7"{
                    self.chnayeleibieStrig = "教育类项目"
                }else if self.chnayeleibieStrig == "8" {
                    self.chnayeleibieStrig = "医疗卫生类项目"
                }else{
                    self.chnayeleibieStrig = "其他产业"
                }
                
                
                
                
                //投资强度(万元/亩)"investLevel":
                self.xiangmutouziqiangduString = (model?.investLevel)!
                
                //开工许可证(施工合同)
//                 "investmentBook":"[]",
                
                //国内市"investorAddressCity" :
                self.touzifangshiName = (model?.investorAddressCity)!
                
                //国内县"investorAddressCountry":
                self.touzifangxianName = (model?.investorAddressCountry)!
                
                //国内省"investorAddressProvince":
                self.touzifangshenName = (model?.investorAddressProvince)!
                
                
                //投资方名称  第二区"investorName":
                self.xiangmufangmingziString = (model?.investorName)!
                //用地审批情况"landApprove":
                self.yongdishenpiStrig = (model?.landApprove)!
                
                //用地审批情况状态情况"landApproveRemark":
                self.yongdipifuString = (model?.landApproveRemark)!
                
                
                
                
//                print("lianxiren======\(model?.linkManArray)")
                
             
                    //            "linkmans":self.xiangmufanglianxirenStrings!,//项目方联系人
                    //            "telphones":self.xiangmufangdianhuaStrings!,//项目方联系电话
                    
              
                    
    
                
               
//                self.linkManArray! = (model?.linkManArray)!
                
                //联系人"linkName":
                self.shineilianxirenString = (model?.linkName)!
                //新闻报"newsReport":

//                if model?.newsReport?.count == 0 {
//                    self.Besa64xinwenimages = [""]
//                }else{
////                    self.Besa64xinwenimages = ()!
//
//
//                }
                
                
//
              
                
                //就业人数"obtainNum":
                self.touchanhoujiuyerenshu = (model?.obtainNum)!
                
                //国外地址"outChinaAddress":
                self.guowaidizhiString = (model?.outChinaAddress)!
                
                
                //年总产值(百万)"outputValue":
                self.xiangmunianzongchanzhiString = (model?.outputValue)!
                
                //履约时间"performTime":
                self.xiangmulvxingshijianString = (model?.performTime)!
                
                //规划审批情况"planApprove":
                self.guihuashenpiStrig = (model?.planApprove)!
                
                //规划审批情况状态情况"planApproveRemark":
                self.guihuapifuString = (model?.planApproveRemark)!
                
                //产品下线照片  "productOfflinePhoto":
//                self.Besa64chanpinimages = (model?.productOfflinePhoto)! as! [String]
                //项目推进计划"projectAdvPlan":
                self.xiangmutuijinjihuaString = (model?.projectAdvPlan)!
                
                //立项审批/备案情况"projectApprove":
                self.lixiangshenpiStrig = (model?.projectApprove)!
                
                //立项审批/备案情况状态情况"projectApproveRemark":
                self.lixiangpifuString = (model?.projectApproveRemark)!
                
                
                
                //省"projectAreaProvince":
                self.xiangmushengshixianString = (model?.projectAreaProvince)!
                
                //项目建设地"projectBuildAddr":
                self.xiangmujianshediString = (model?.projectBuildAddr)!
                
                //项目建设基本内容"projectContent":
                self.xiangmujianshejibenString = (model?.projectContent)!
                
                //项目简介"projectIntro":
                self.xiangmujianjieString = (model?.projectIntro)!
                //项目名称"projectName":
                self.xiangmumingchengString = (model?.projectName)!
                
                
                //项目进度实景照片"projectRealPhoto":
//                self.Besa64xiangmuPhotoimages = (model?.projectRealPhoto)! as! [String]
                
                //项目引荐人"projectReferee":
                self.shineiyindaorenString = (model?.projectReferee)!
                
                //引荐人电话"projectRefereeTelphone":
                self.shineiyindaorendianhuaString = (model?.projectRefereeTelphone)!
                
                //工程进度"projectSpeed":
                self.xiangmuwanchenggongchengString = (model?.projectSpeed)!
                
                // 项目进度  第一区"projectStage":
                self.xiangmuString = (model?.projectStage)!
                
                
                
                
                
                if self.xiangmuString == "5" {
                    self.xiangmuString = "在谈";
                }else if self.xiangmuString == "4" {
                    self.xiangmuString = "签约";
                }else if self.xiangmuString == "3"{
                    self.xiangmuString = "履约";
                }else if self.xiangmuString == "2"{
                    self.xiangmuString = "开工";
                }else {
                    self.xiangmuString = "投产";
                }
                
                
                //投产时间"putIntoProductTime":
                self.xiangmutouchanshijianString = (model?.putIntoProductTime)!
                //问题描述"questionDesp":
                self.xiangmuwentimiaoshuString = (model?.questionDesp)!
                //签约照片self.Besa64Photoimages签约图片"signPicture":
//                self.Besa64Photoimages = (model?.signPicture)! as! [String]
                //签约时间"signTime":
                self.qianyueStrig = (model?.signTime)!
                
                
//                "startLicence":"[]",            //投资协议书
                //开工仪式照片self.Besa64kaigongimages"startRite":
//                self.Besa64kaigongimages = (model?.startRite)! as! [String]
                //开工时间 "startTime":
               self.xiangmukaigongshijianString = (model?.startTime)!
                
                //年上缴税费总额(百万) "taxTotalVal":
                self.xiangmunianshangshuifeizongeString = (model?.taxTotalVal)!
                //是否五百强"topOfWorld":
                self.wubaiString = (model?.topOfWorld)!
                
                
                if self.wubaiString == "1"{
                    self.wubaiString = "世界五百强"
                }else if self.wubaiString == "2"{
                    self.wubaiString = "中国五百强"
                }else if self.wubaiString == "3"{
                    self.wubaiString = "民营500强"
                }else if self.wubaiString == "4"{
                    self.wubaiString = "高新技术企业"
                }else {
                    self.wubaiString = "否"
                }
                
                
                //单位地址"unitAddress":
                self.hezuofangshenName = (model?.unitAddress)!
                
                //单位负责人"unitLeader":
                self.shineidanweifuzerenString = (model?.unitLeader)!
                
                //单位名称"unitName":
                self.shineixiangmumingchengString = (model?.unitName)!
                
                //单位性质"unitPropert":
                self.xingzhi = (model?.unitPropert)!
                
                
                
                //当年到位资金(万元) "yearExistCapital":
               self.xiangmudangniandaoweizijinString = (model?.yearExistCapital)!
                
                
                //年上缴税费总额"yearTaxTotal":
                self.nianshangshuifeizonge = (model?.yearTaxTotal)!
                
            }
            
            self.tableView.reloadData()
            
            
        }
        
        
    }
    
    @objc func dubanButtonClick(){
        print("点击督办")
    }
    
    @objc func  quedingButtonClick(){
        
        let queren = queRenViewController()
        
        queren.deploymentName = self.deploymentName
        
        
        
        //        //                //项目方联系人"linkmans":
        //        self.xiangmufanglianxirenString = linkdic!["linkman"]?.string
        queren.linkName = self.shineilianxirenString
        
        
        //
        //        //
        //        //                //项目方联系电话 "telphones":
        //        self.xiangmufangdianhuaString = linkdic!["telphone"]?.string
        //
        //
        //        //                print("1========\(model)")
        //        //协议投资额 "agreementAmount":
        //        self.xiangmuxieyitouzieString = (model?.agreementAmount)!
        
        queren.agreementAmount = self.xiangmuxieyitouzieString
        //
        //
        //
        //        //总占地面积(亩) "areaCovered":
        //        self.xiangmuzongzhandimianjiString = (model?.areaCovered)!
        queren.areaCovered = self.xiangmuzongzhandimianjiString
        //        //建设审批情况 "buildApprove":
        
        //        self.jiansheshenpiStrig = (model?.buildApprove)!
        
        queren.buildApprove = self.jiansheshenpiStrig
        //        //建设审批情况状态情况"buildApproveRemark":
        //        self.jianshepifuString = (model?.buildApproveRemark)!
        
        queren.buildApproveRemark = self.jianshepifuString
        //
        //        //总建筑面积(万平方米)"buildCovered":
        //        self.xiangmuzongjianzhumianjiString = (model?.buildCovered)!
        
        queren.buildCovered = self.xiangmuzongjianzhumianjiString
        //
        //        //工商登记情况"businessRegist":
        //        self.gongshangqingkuangStrig = (model?.businessRegist)!
        queren.businessRegist = self.gongshangqingkuangStrig
        //        //工商登记情况状态情况"businessRegistRemark":
        //        self.gongshangpifuString = (model?.businessRegistRemark)!
        
        queren.businessRegistRemark = self.gongshangpifuString
        //
        //        //对接情况"buttSituation":
        //        self.duijieqingkuangString = (model?.buttSituation)!
        
        queren.buttSituation = self.duijieqingkuangString
        //        //项目合作方  第三区"capitalAttractor":
        //        self.shinei = (model?.capitalAttractor)!
        
        
        queren.capitalAttractor = self.shinei
        //
        //
        //
        //
        //
        //
        //        //竣工验收报告//            "compAccepReport":
        //        //                self.xiangmujungongyanshouStrings! = (model?.compAccepReport)!
        
        //
        //
        //        //项目建设进度//完成年度投资计划百分比"completePercent":
        //        self.xiangmuwanchengniandujihuaString = (model?.completePercent)!
        
        queren.completePercent = self.xiangmuwanchengniandujihuaString
        //
        //        //完成年度实物工程量计划百分比"completeWorkPercent":
        //        self.xiangmuwanchengniandushiwujihuaString = (model?.completeWorkPercent)!
        
        queren.completeWorkPercent = self.xiangmuwanchengniandushiwujihuaString
        //        //联系电话"coopePhone":
        //        self.shineilianxirendianhuaString = (model?.coopePhone)!
        
        queren.coopePhone = self.shineilianxirendianhuaString
        //
        //
        //        //更新时间self.gengxinStrings!"createtime":
        //        self.gengxinString = (model?.createtime)!
        
        queren.createtime = self.gengxinString
        //        //部门名称"departmentName":
        //        self.xiangmubumenmingchengString = (model?.departmentName)!
        
        queren.departmentName = self.xiangmubumenmingchengString
        //        //就业人数"employNum":
        //        self.xiangmujiuyerenshuString = (model?.employNum)!
        
        queren.employNum = self.xiangmujiuyerenshuString
        //
        //        //环保审批情况"environmentApprove":
        //        self.huanbaoshenpiStrig = (model?.environmentApprove)!
        
        queren.environmentApprove = self.huanbaoshenpiStrig
        //        //环保审批情况状态情况"environmentApproveRemark":
        //        self.huanbaopifuString = (model?.environmentApproveRemark)!
        
        queren.environmentApproveRemark = self.huanbaopifuString
        //        //累计到位资金(万元)"existCapital":
        //        self.xiangmuleijidaoweizijinString = (model?.existCapital)!
        
        queren.existCapital = self.xiangmuleijidaoweizijinString
        //
        //
        //        //到位资金证明材料
        //        //                "existCapitalProve":"[]"
        //        //纳入固定资产投资统计累计到位资金(万元) "fixedAssetExistCapital":
        //        self.xiangmunaruleijidaoweizijinString = (model?.fixedAssetExistCapital)!
        
        queren.fixedAssetExistCapital = self.xiangmunaruleijidaoweizijinString
        //
        //        //纳入固定资产投资统计当年到位资金(万元) "fixedAssetYearExistCapital":
        //        self.xiangmunarudangniandaoweizijinString = (model?.fixedAssetYearExistCapital)!
        queren.fixedAssetYearExistCapital = self.xiangmunarudangniandaoweizijinString
        //        //年产总值"ganOutVal":
        //        self.touchannianchanzongzhi = (model?.ganOutVal)!
        
        queren.ganOutVal = self.touchannianchanzongzhi
        //
        //        //是否国内"inChina":
        //        self.guoneiString = (model?.inChina)!
        
        
        queren.inChina = self.guoneiString
        //
        //
        //
        //        if self.guoneiString == "1"{
        //
        //            self.guoneiString  = "国内"
        //            self.touzifangguojiadizhi = self.guoneitouzidizhiString
        //        }else{
        //
        //
        //            self.touzifangguojiadizhi = self.guowaidizhiString
        //        }
        //
        //        //产业类别"industryCategoryId":
        //        self.chnayeleibieStrig = (model?.industryCategoryId)!
        
        
        queren.industryCategoryId = self.chnayeleibieStrig
        //
        //
        //        if self.chnayeleibieStrig == "1" {
        //            self.chnayeleibieStrig = "高原特色农业和生物资源深加工产业"
        //        }else if self.chnayeleibieStrig == "2" {
        //            self.chnayeleibieStrig = "有色金属深加工和液态金属产业"
        //        }else if self.chnayeleibieStrig == "3" {
        //            self.chnayeleibieStrig = "军民融合现代装备制造产业"
        //        }else if self.chnayeleibieStrig == "4" {
        //            self.chnayeleibieStrig = "精细化工产业"
        //        }else if self.chnayeleibieStrig == "5" {
        //            self.chnayeleibieStrig = "现代商贸物流产业"
        //        }else if self.chnayeleibieStrig == "6" {
        //            self.chnayeleibieStrig = "文化旅游和高原体育产业"
        //        }else if self.chnayeleibieStrig == "7"{
        //            self.chnayeleibieStrig = "教育类项目"
        //        }else if self.chnayeleibieStrig == "8" {
        //            self.chnayeleibieStrig = "医疗卫生类项目"
        //        }else{
        //            self.chnayeleibieStrig = "其他产业"
        //        }
        //
        //
        //
        //
        //        //投资强度(万元/亩)"investLevel":
        //        self.xiangmutouziqiangduString = (model?.investLevel)!
        
        queren.investLevel = self.xiangmutouziqiangduString
        //
        //        //开工许可证(施工合同)
        //        //                 "investmentBook":"[]",
        //
        //        //国内市"investorAddressCity" :
        //        self.touzifangshiName = (model?.investorAddressCity)!
        
        queren.investorAddressCity = self.touzifangshiName
        //
        //        //国内县"investorAddressCountry":
        //        self.touzifangxianName = (model?.investorAddressCountry)!
        
        queren.investorAddressCountry = self.touzifangxianName
        //
        //        //国内省"investorAddressProvince":
        //        self.touzifangshenName = (model?.investorAddressProvince)!
        
        queren.investorAddressProvince = self.touzifangshenName
        //
        //
        //        //投资方名称  第二区"investorName":
        //        self.xiangmufangmingziString = (model?.investorName)!
        
        queren.investorName = self.xiangmufangmingziString
        //        //用地审批情况"landApprove":
        //        self.yongdishenpiStrig = (model?.landApprove)!
        
        queren.landApprove = self.yongdishenpiStrig
        //
        //        //用地审批情况状态情况"landApproveRemark":
        //        self.yongdipifuString = (model?.landApproveRemark)!
        
        queren.landApproveRemark = self.yongdipifuString
        //
        //
        //        "linkmans":self.xiangmufanglianxirenStrings!,//
        //
        queren.linkmans = self.xiangmufanglianxirenString
        //        "telphones":self.xiangmufangdianhuaStrings!,//
        queren.telphones = self.xiangmufangdianhuaString
        
        //
        //
        //        //                print("lianxiren======\(model?.linkManArray)")
        //
        //
        //        //            "linkmans":self.xiangmufanglianxirenStrings!,//项目方联系人
        //        //            "telphones":self.xiangmufangdianhuaStrings!,//项目方联系电话
        
        
        
        //
        //
        //
        //
        //
        //
        //        //                self.linkManArray! = (model?.linkManArray)!
        //
        //        //联系人"linkName":
        //        self.shineilianxirenString = (model?.linkName)!
        //        //新闻报"newsReport":
        //
        //        //                if model?.newsReport?.count == 0 {
        //        //                    self.Besa64xinwenimages = [""]
        //        //                }else{
        //        ////                    self.Besa64xinwenimages = ()!
        //        //
        //        //
        //        //                }
        //
        //
        //        //
        //
        //
        //        //就业人数"obtainNum":
        //        self.touchanhoujiuyerenshu = (model?.obtainNum)!
        
        
        queren.obtainNum = self.touchanhoujiuyerenshu
        //
        //        //国外地址"outChinaAddress":
        //        self.guowaidizhiString = (model?.outChinaAddress)!
        
        queren.outChinaAddress = self.guowaidizhiString
        //
        //
        //        //年总产值(百万)"outputValue":
        //        self.xiangmunianzongchanzhiString = (model?.outputValue)!
        
        queren.outputValue = self.xiangmunianzongchanzhiString
        //
        //        //履约时间"performTime":
        //        self.xiangmulvxingshijianString = (model?.performTime)!
        
        queren.performTime = self.xiangmulvxingshijianString
        //
        //        //规划审批情况"planApprove":
        //        self.guihuashenpiStrig = (model?.planApprove)!
        
        queren.planApprove = self.guihuashenpiStrig
        //
        //        //规划审批情况状态情况"planApproveRemark":
        //        self.guihuapifuString = (model?.planApproveRemark)!
        
        queren.planApproveRemark = self.guihuapifuString
        //
        //        //产品下线照片  "productOfflinePhoto":
        //        //                self.Besa64chanpinimages = (model?.productOfflinePhoto)! as! [String]
        //        //项目推进计划"projectAdvPlan":
        //        self.xiangmutuijinjihuaString = (model?.projectAdvPlan)!
        
        
        queren.projectAdvPlan = self.xiangmutuijinjihuaString
        //
        //        //立项审批/备案情况"projectApprove":
        //        self.lixiangshenpiStrig = (model?.projectApprove)!
        
        
        queren.projectApprove = self.lixiangshenpiStrig
        //
        //        //立项审批/备案情况状态情况"projectApproveRemark":
        //        self.lixiangpifuString = (model?.projectApproveRemark)!
        
        queren.projectApproveRemark = self.lixiangpifuString
        //
        //
        //
        //        //省"projectAreaProvince":
        //        self.xiangmushengshixianString = (model?.projectAreaProvince)!
        
        
        queren.projectAreaProvince = self.xiangmushengshixianString
        //
        //        //项目建设地"projectBuildAddr":
        //        self.xiangmujianshediString = (model?.projectBuildAddr)!
        
        queren.projectBuildAddr = self.xiangmujianshediString
        //
        //        //项目建设基本内容"projectContent":
        //        self.xiangmujianshejibenString = (model?.projectContent)!
        
        
        queren.projectContent = self.xiangmujianshejibenString
        //
        //        //项目简介"projectIntro":
        //        self.xiangmujianjieString = (model?.projectIntro)!
        
        queren.projectIntro = self.xiangmujianjieString
        //        //项目名称"projectName":
        //        self.xiangmumingchengString = (model?.projectName)!
        
        
        queren.projectName = self.xiangmumingchengString
        //
        //
        //        //项目进度实景照片"projectRealPhoto":
        //        //                self.Besa64xiangmuPhotoimages = (model?.projectRealPhoto)! as! [String]
        //
        //        //项目引荐人"projectReferee":
        //        self.shineiyindaorenString = (model?.projectReferee)!
        
        queren.projectReferee = self.shineiyindaorenString
        //
        //        //引荐人电话"projectRefereeTelphone":
        //        self.shineiyindaorendianhuaString = (model?.projectRefereeTelphone)!
        
        
        queren.projectRefereeTelphone = self.shineiyindaorendianhuaString
        //
        //        //工程进度"projectSpeed":
        //        self.xiangmuwanchenggongchengString = (model?.projectSpeed)!
        
        queren.projectSpeed = self.xiangmuwanchenggongchengString
        //
        //        // 项目进度  第一区"projectStage":
        //        self.xiangmuString = (model?.projectStage)!
        
        
        queren.projectStage = self.xiangmuString
        //
        //
        //
        //
        //
        //        if self.xiangmuString == "5" {
        //            self.xiangmuString = "在谈";
        //        }else if self.xiangmuString == "4" {
        //            self.xiangmuString = "签约";
        //        }else if self.xiangmuString == "3"{
        //            self.xiangmuString = "履约";
        //        }else if self.xiangmuString == "2"{
        //            self.xiangmuString = "开工";
        //        }else {
        //            self.xiangmuString = "投产";
        //        }
        //
        //
        //        //投产时间"putIntoProductTime":
        //        self.xiangmutouchanshijianString = (model?.putIntoProductTime)!
        
        queren.putIntoProductTime = self.xiangmutouchanshijianString
        //        //问题描述"questionDesp":
        //        self.xiangmuwentimiaoshuString = (model?.questionDesp)!
        
        queren.questionDesp = self.xiangmuwentimiaoshuString
        //        //签约照片self.Besa64Photoimages签约图片"signPicture":
        //        //                self.Besa64Photoimages = (model?.signPicture)! as! [String]
        //        //签约时间"signTime":
        //        self.qianyueStrig = (model?.signTime)!
        
        queren.signTime = self.qianyueStrig
        //
        //
        //        //                "startLicence":"[]",            //投资协议书
        //        //开工仪式照片self.Besa64kaigongimages"startRite":
        //        //                self.Besa64kaigongimages = (model?.startRite)! as! [String]
        //        //开工时间 "startTime":
        //        self.xiangmukaigongshijianString = (model?.startTime)!
        
        
        queren.startTime = self.xiangmukaigongshijianString
        //
        //        //年上缴税费总额(百万) "taxTotalVal":
        //        self.xiangmunianshangshuifeizongeString = (model?.taxTotalVal)!
        
        queren.taxTotalVal = self.xiangmunianshangshuifeizongeString
        //        //是否五百强"topOfWorld":
        //        self.wubaiString = (model?.topOfWorld)!
        
        queren.topOfWorld = self.wubaiString
        //
        //
        //        if self.wubaiString == "1"{
        //            self.wubaiString = "世界五百强"
        //        }else if self.wubaiString == "2"{
        //            self.wubaiString = "中国五百强"
        //        }else if self.wubaiString == "3"{
        //            self.wubaiString = "民营500强"
        //        }else if self.wubaiString == "4"{
        //            self.wubaiString = "高新技术企业"
        //        }else {
        //            self.wubaiString = "否"
        //        }
        //
        //
        //        //单位地址"unitAddress":
        //        self.hezuofangshenName = (model?.unitAddress)!
        
        queren.unitAddress = self.hezuofangshenName
        //
        //        //单位负责人"unitLeader":
        //        self.shineidanweifuzerenString = (model?.unitLeader)!
        
        queren.unitLeader = self.shineidanweifuzerenString
        //
        //        //单位名称"unitName":
        //        self.shineixiangmumingchengString = (model?.unitName)!
        
        queren.unitName = self.shineixiangmumingchengString
        //
        //        //单位性质"unitPropert":
        //        self.xingzhi = (model?.unitPropert)!
        
        queren.unitPropert = self.xingzhi
        //
        //
        //
        //        //当年到位资金(万元) "yearExistCapital":
        //        self.xiangmudangniandaoweizijinString = (model?.yearExistCapital)!
        
        queren.yearExistCapital = self.xiangmudangniandaoweizijinString
        //
        //
        //        //年上缴税费总额"yearTaxTotal":
        //        self.nianshangshuifeizonge = (model?.yearTaxTotal)!
        
        queren.yearTaxTotal = self.nianshangshuifeizonge
        
        
        
      
        
        
        
        queren.exclusiveGateWayFlag  = self.tuisong
        
        queren.informationRecordId = self.informationRecordId
        queren.taskId = self.taskId
        
        queren.countryLeaderMan = self.banlirenid
        
        self.navigationController?.pushViewController(queren, animated: true)
        
        
    }
    
    @objc func bohuiButtonClick(){
        print("驳回")
         let bohui = bohuiViewController()
//        bohui.xiangmuString = self.xiangmuString
        
        bohui.informationRecordId = self.informationRecordId
        bohui.taskId = self.taskId
        self.navigationController?.pushViewController(bohui, animated: true)
        
        
        
  
    }
    
    
    
    
    
    @objc func lishiButtonClick(){
        print("历史问题")
        
        let lishi = lishiViewController()
        lishi.informationRecordId = self.informationRecordId!
        self.navigationController?.pushViewController(lishi, animated: true)
    }
    
    @objc func  luruButtonClick(){
        
        print("点击确定====\(self.deploymentName!)")
        
        
        
       
        
 
        let queren = queRenViewController()
        
        queren.deploymentName = self.deploymentName
        
        
        
//        //                //项目方联系人"linkmans":
//        self.xiangmufanglianxirenString = linkdic!["linkman"]?.string
        queren.linkName = self.shineilianxirenString
        
        
//
//        //
//        //                //项目方联系电话 "telphones":
//        self.xiangmufangdianhuaString = linkdic!["telphone"]?.string
//
//
//        //                print("1========\(model)")
//        //协议投资额 "agreementAmount":
//        self.xiangmuxieyitouzieString = (model?.agreementAmount)!
        
        queren.agreementAmount = self.xiangmuxieyitouzieString
//
//
//
//        //总占地面积(亩) "areaCovered":
//        self.xiangmuzongzhandimianjiString = (model?.areaCovered)!
        queren.areaCovered = self.xiangmuzongzhandimianjiString
//        //建设审批情况 "buildApprove":
        
//        self.jiansheshenpiStrig = (model?.buildApprove)!
        
        queren.buildApprove = self.jiansheshenpiStrig
//        //建设审批情况状态情况"buildApproveRemark":
//        self.jianshepifuString = (model?.buildApproveRemark)!
        
        queren.buildApproveRemark = self.jianshepifuString
//
//        //总建筑面积(万平方米)"buildCovered":
//        self.xiangmuzongjianzhumianjiString = (model?.buildCovered)!
        
        queren.buildCovered = self.xiangmuzongjianzhumianjiString
//
//        //工商登记情况"businessRegist":
//        self.gongshangqingkuangStrig = (model?.businessRegist)!
        queren.businessRegist = self.gongshangqingkuangStrig
//        //工商登记情况状态情况"businessRegistRemark":
//        self.gongshangpifuString = (model?.businessRegistRemark)!
        
        queren.businessRegistRemark = self.gongshangpifuString
//
//        //对接情况"buttSituation":
//        self.duijieqingkuangString = (model?.buttSituation)!
        
        queren.buttSituation = self.duijieqingkuangString
//        //项目合作方  第三区"capitalAttractor":
//        self.shinei = (model?.capitalAttractor)!
        
        
        queren.capitalAttractor = self.shinei
//
//
//
//
//
//
//        //竣工验收报告//            "compAccepReport":
//        //                self.xiangmujungongyanshouStrings! = (model?.compAccepReport)!
        
//
//
//        //项目建设进度//完成年度投资计划百分比"completePercent":
//        self.xiangmuwanchengniandujihuaString = (model?.completePercent)!
        
        queren.completePercent = self.xiangmuwanchengniandujihuaString
//
//        //完成年度实物工程量计划百分比"completeWorkPercent":
//        self.xiangmuwanchengniandushiwujihuaString = (model?.completeWorkPercent)!
        
        queren.completeWorkPercent = self.xiangmuwanchengniandushiwujihuaString
//        //联系电话"coopePhone":
//        self.shineilianxirendianhuaString = (model?.coopePhone)!
        
        queren.coopePhone = self.shineilianxirendianhuaString
//
//
//        //更新时间self.gengxinStrings!"createtime":
//        self.gengxinString = (model?.createtime)!
        
        queren.createtime = self.gengxinString
//        //部门名称"departmentName":
//        self.xiangmubumenmingchengString = (model?.departmentName)!
        
        queren.departmentName = self.xiangmubumenmingchengString
//        //就业人数"employNum":
//        self.xiangmujiuyerenshuString = (model?.employNum)!
        
        queren.employNum = self.xiangmujiuyerenshuString
//
//        //环保审批情况"environmentApprove":
//        self.huanbaoshenpiStrig = (model?.environmentApprove)!
        
        queren.environmentApprove = self.huanbaoshenpiStrig
//        //环保审批情况状态情况"environmentApproveRemark":
//        self.huanbaopifuString = (model?.environmentApproveRemark)!
        
        queren.environmentApproveRemark = self.huanbaopifuString
//        //累计到位资金(万元)"existCapital":
//        self.xiangmuleijidaoweizijinString = (model?.existCapital)!
        
        queren.existCapital = self.xiangmuleijidaoweizijinString
//
//
//        //到位资金证明材料
//        //                "existCapitalProve":"[]"
//        //纳入固定资产投资统计累计到位资金(万元) "fixedAssetExistCapital":
//        self.xiangmunaruleijidaoweizijinString = (model?.fixedAssetExistCapital)!
        
        queren.fixedAssetExistCapital = self.xiangmunaruleijidaoweizijinString
//
//        //纳入固定资产投资统计当年到位资金(万元) "fixedAssetYearExistCapital":
//        self.xiangmunarudangniandaoweizijinString = (model?.fixedAssetYearExistCapital)!
        queren.fixedAssetYearExistCapital = self.xiangmunarudangniandaoweizijinString
//        //年产总值"ganOutVal":
//        self.touchannianchanzongzhi = (model?.ganOutVal)!
        
        queren.ganOutVal = self.touchannianchanzongzhi
//
//        //是否国内"inChina":
//        self.guoneiString = (model?.inChina)!
        
        
        queren.inChina = self.guoneiString
//
//
//
//        if self.guoneiString == "1"{
//
//            self.guoneiString  = "国内"
//            self.touzifangguojiadizhi = self.guoneitouzidizhiString
//        }else{
//
//
//            self.touzifangguojiadizhi = self.guowaidizhiString
//        }
//
//        //产业类别"industryCategoryId":
//        self.chnayeleibieStrig = (model?.industryCategoryId)!
        
        
        queren.industryCategoryId = self.chnayeleibieStrig
//
//
//        if self.chnayeleibieStrig == "1" {
//            self.chnayeleibieStrig = "高原特色农业和生物资源深加工产业"
//        }else if self.chnayeleibieStrig == "2" {
//            self.chnayeleibieStrig = "有色金属深加工和液态金属产业"
//        }else if self.chnayeleibieStrig == "3" {
//            self.chnayeleibieStrig = "军民融合现代装备制造产业"
//        }else if self.chnayeleibieStrig == "4" {
//            self.chnayeleibieStrig = "精细化工产业"
//        }else if self.chnayeleibieStrig == "5" {
//            self.chnayeleibieStrig = "现代商贸物流产业"
//        }else if self.chnayeleibieStrig == "6" {
//            self.chnayeleibieStrig = "文化旅游和高原体育产业"
//        }else if self.chnayeleibieStrig == "7"{
//            self.chnayeleibieStrig = "教育类项目"
//        }else if self.chnayeleibieStrig == "8" {
//            self.chnayeleibieStrig = "医疗卫生类项目"
//        }else{
//            self.chnayeleibieStrig = "其他产业"
//        }
//
//
//
//
//        //投资强度(万元/亩)"investLevel":
//        self.xiangmutouziqiangduString = (model?.investLevel)!
        
        queren.investLevel = self.xiangmutouziqiangduString
//
//        //开工许可证(施工合同)
//        //                 "investmentBook":"[]",
//
//        //国内市"investorAddressCity" :
//        self.touzifangshiName = (model?.investorAddressCity)!
        
        queren.investorAddressCity = self.touzifangshiName
//
//        //国内县"investorAddressCountry":
//        self.touzifangxianName = (model?.investorAddressCountry)!
        
        queren.investorAddressCountry = self.touzifangxianName
//
//        //国内省"investorAddressProvince":
//        self.touzifangshenName = (model?.investorAddressProvince)!
        
        queren.investorAddressProvince = self.touzifangshenName
//
//
//        //投资方名称  第二区"investorName":
//        self.xiangmufangmingziString = (model?.investorName)!
        
        queren.investorName = self.xiangmufangmingziString
//        //用地审批情况"landApprove":
//        self.yongdishenpiStrig = (model?.landApprove)!
        
        queren.landApprove = self.yongdishenpiStrig
//
//        //用地审批情况状态情况"landApproveRemark":
//        self.yongdipifuString = (model?.landApproveRemark)!
        
        queren.landApproveRemark = self.yongdipifuString
//
//
//        "linkmans":self.xiangmufanglianxirenStrings!,//
//
        queren.linkmans = self.xiangmufanglianxirenString
//        "telphones":self.xiangmufangdianhuaStrings!,//
        queren.telphones = self.xiangmufangdianhuaString
        
//
//
//        //                print("lianxiren======\(model?.linkManArray)")
//
//
//        //            "linkmans":self.xiangmufanglianxirenStrings!,//项目方联系人
//        //            "telphones":self.xiangmufangdianhuaStrings!,//项目方联系电话
        
        
      
//
//
//
//
//
//
//        //                self.linkManArray! = (model?.linkManArray)!
//
//        //联系人"linkName":
//        self.shineilianxirenString = (model?.linkName)!
//        //新闻报"newsReport":
//
//        //                if model?.newsReport?.count == 0 {
//        //                    self.Besa64xinwenimages = [""]
//        //                }else{
//        ////                    self.Besa64xinwenimages = ()!
//        //
//        //
//        //                }
//
//
//        //
//
//
//        //就业人数"obtainNum":
//        self.touchanhoujiuyerenshu = (model?.obtainNum)!
        
        
        queren.obtainNum = self.touchanhoujiuyerenshu
//
//        //国外地址"outChinaAddress":
//        self.guowaidizhiString = (model?.outChinaAddress)!
        
        queren.outChinaAddress = self.guowaidizhiString
//
//
//        //年总产值(百万)"outputValue":
//        self.xiangmunianzongchanzhiString = (model?.outputValue)!
        
        queren.outputValue = self.xiangmunianzongchanzhiString
//
//        //履约时间"performTime":
//        self.xiangmulvxingshijianString = (model?.performTime)!
        
        queren.performTime = self.xiangmulvxingshijianString
//
//        //规划审批情况"planApprove":
//        self.guihuashenpiStrig = (model?.planApprove)!
        
        queren.planApprove = self.guihuashenpiStrig
//
//        //规划审批情况状态情况"planApproveRemark":
//        self.guihuapifuString = (model?.planApproveRemark)!
        
        queren.planApproveRemark = self.guihuapifuString
//
//        //产品下线照片  "productOfflinePhoto":
//        //                self.Besa64chanpinimages = (model?.productOfflinePhoto)! as! [String]
//        //项目推进计划"projectAdvPlan":
//        self.xiangmutuijinjihuaString = (model?.projectAdvPlan)!
        
        
        queren.projectAdvPlan = self.xiangmutuijinjihuaString
//
//        //立项审批/备案情况"projectApprove":
//        self.lixiangshenpiStrig = (model?.projectApprove)!
        
        
        queren.projectApprove = self.lixiangshenpiStrig
//
//        //立项审批/备案情况状态情况"projectApproveRemark":
//        self.lixiangpifuString = (model?.projectApproveRemark)!
        
        queren.projectApproveRemark = self.lixiangpifuString
//
//
//
//        //省"projectAreaProvince":
//        self.xiangmushengshixianString = (model?.projectAreaProvince)!
        
        
        queren.projectAreaProvince = self.xiangmushengshixianString
//
//        //项目建设地"projectBuildAddr":
//        self.xiangmujianshediString = (model?.projectBuildAddr)!
        
        queren.projectBuildAddr = self.xiangmujianshediString
//
//        //项目建设基本内容"projectContent":
//        self.xiangmujianshejibenString = (model?.projectContent)!
        
        
        queren.projectContent = self.xiangmujianshejibenString
//
//        //项目简介"projectIntro":
//        self.xiangmujianjieString = (model?.projectIntro)!
        
        queren.projectIntro = self.xiangmujianjieString
//        //项目名称"projectName":
//        self.xiangmumingchengString = (model?.projectName)!
        
        
        queren.projectName = self.xiangmumingchengString
//
//
//        //项目进度实景照片"projectRealPhoto":
//        //                self.Besa64xiangmuPhotoimages = (model?.projectRealPhoto)! as! [String]
//
//        //项目引荐人"projectReferee":
//        self.shineiyindaorenString = (model?.projectReferee)!
        
        queren.projectReferee = self.shineiyindaorenString
//
//        //引荐人电话"projectRefereeTelphone":
//        self.shineiyindaorendianhuaString = (model?.projectRefereeTelphone)!
        
        
        queren.projectRefereeTelphone = self.shineiyindaorendianhuaString
//
//        //工程进度"projectSpeed":
//        self.xiangmuwanchenggongchengString = (model?.projectSpeed)!
        
        queren.projectSpeed = self.xiangmuwanchenggongchengString
//
//        // 项目进度  第一区"projectStage":
//        self.xiangmuString = (model?.projectStage)!
        
        
        queren.projectStage = self.xiangmuString
//
//
//
//
//
//        if self.xiangmuString == "5" {
//            self.xiangmuString = "在谈";
//        }else if self.xiangmuString == "4" {
//            self.xiangmuString = "签约";
//        }else if self.xiangmuString == "3"{
//            self.xiangmuString = "履约";
//        }else if self.xiangmuString == "2"{
//            self.xiangmuString = "开工";
//        }else {
//            self.xiangmuString = "投产";
//        }
//
//
//        //投产时间"putIntoProductTime":
//        self.xiangmutouchanshijianString = (model?.putIntoProductTime)!
        
        queren.putIntoProductTime = self.xiangmutouchanshijianString
//        //问题描述"questionDesp":
//        self.xiangmuwentimiaoshuString = (model?.questionDesp)!
        
        queren.questionDesp = self.xiangmuwentimiaoshuString
//        //签约照片self.Besa64Photoimages签约图片"signPicture":
//        //                self.Besa64Photoimages = (model?.signPicture)! as! [String]
//        //签约时间"signTime":
//        self.qianyueStrig = (model?.signTime)!
        
        queren.signTime = self.qianyueStrig
//
//
//        //                "startLicence":"[]",            //投资协议书
//        //开工仪式照片self.Besa64kaigongimages"startRite":
//        //                self.Besa64kaigongimages = (model?.startRite)! as! [String]
//        //开工时间 "startTime":
//        self.xiangmukaigongshijianString = (model?.startTime)!
        
        
        queren.startTime = self.xiangmukaigongshijianString
//
//        //年上缴税费总额(百万) "taxTotalVal":
//        self.xiangmunianshangshuifeizongeString = (model?.taxTotalVal)!
        
        queren.taxTotalVal = self.xiangmunianshangshuifeizongeString
//        //是否五百强"topOfWorld":
//        self.wubaiString = (model?.topOfWorld)!
        
        queren.topOfWorld = self.wubaiString
//
//
//        if self.wubaiString == "1"{
//            self.wubaiString = "世界五百强"
//        }else if self.wubaiString == "2"{
//            self.wubaiString = "中国五百强"
//        }else if self.wubaiString == "3"{
//            self.wubaiString = "民营500强"
//        }else if self.wubaiString == "4"{
//            self.wubaiString = "高新技术企业"
//        }else {
//            self.wubaiString = "否"
//        }
//
//
//        //单位地址"unitAddress":
//        self.hezuofangshenName = (model?.unitAddress)!
        
        queren.unitAddress = self.hezuofangshenName
//
//        //单位负责人"unitLeader":
//        self.shineidanweifuzerenString = (model?.unitLeader)!
        
        queren.unitLeader = self.shineidanweifuzerenString
//
//        //单位名称"unitName":
//        self.shineixiangmumingchengString = (model?.unitName)!
        
        queren.unitName = self.shineixiangmumingchengString
//
//        //单位性质"unitPropert":
//        self.xingzhi = (model?.unitPropert)!
        
        queren.unitPropert = self.xingzhi
//
//
//
//        //当年到位资金(万元) "yearExistCapital":
//        self.xiangmudangniandaoweizijinString = (model?.yearExistCapital)!
        
        queren.yearExistCapital = self.xiangmudangniandaoweizijinString
//
//
//        //年上缴税费总额"yearTaxTotal":
//        self.nianshangshuifeizonge = (model?.yearTaxTotal)!
        
        queren.yearTaxTotal = self.nianshangshuifeizonge
        
        
        
        
        print("shifoukexing=======\(self.tuisong)")
        
        
         print("shifoukexing=======\(self.namestring)")
        
        
        print("shifoukexing=======\(self.banlirenid)")
        
        queren.taskId = self.taskId
        
        queren.exclusiveGateWayFlag  = self.tuisong
        
        queren.informationRecordId = self.informationRecordId
        
        
        queren.countryLeaderMan = self.banlirenid
        
        self.navigationController?.pushViewController(queren, animated: true)
      
        

    }
    func getJSONStringFromDictionary(dictionary:NSDictionary) -> String {
        if (!JSONSerialization.isValidJSONObject(dictionary)) {
            print("无法解析出JSONString")
            return ""
        }
        let data : NSData! = try? JSONSerialization.data(withJSONObject: dictionary, options: []) as NSData!
        let JSONString = NSString(data:data as Data,encoding: String.Encoding.utf8.rawValue)
        return JSONString! as String
        
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
}

extension XiangMuLuRuBanliViewController: UITableViewDelegate, UITableViewDataSource,UITextFieldDelegate ,loadingDeleagte ,xinwenDeleagte,chanpinxiaxianDeleagte,kaigongyishiDeleagte,xiangmuPhotoDeleagte{
    func kaigongyishiDeleagte(text: Array<Any>, indexs: NSInteger) {
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    func xiangmuPhotoDeleagte(text: Array<Any>, indexs: NSInteger) {
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    //产品线下
    func chanpinxiaxianDeleagte(text: Array<Any>, indexs: NSInteger) {
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    func xinwenDeleagte(text: Array<Any>, indexs: NSInteger) {
        
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    func didLoading(text: Array<Any>, indexs: NSInteger) {
     
        
        
        //进入图片全屏展示
        let previewVC = ImagePreviewVC(images: text as! [UIImage], index: indexs)
        
        
        
        self.present(previewVC, animated: true, completion: nil)
    }
    
    
    
    
    
    func numberOfSections(in tableView: UITableView) -> Int {
        return 9
    }
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        
        if section == 0 {
            
            return  self.nameArray.count
            
        }
        else if section  == 1 {
            
            return self.xiangmutouzifangArray.count
            
        }else if section == 2 {
            
            return self.shineihezuofangArray.count
            
        }else if section == 3 {
            
            return self.jinzhanArray.count
            
        }else if section == 4 {
            
            return self.qingkuangArray.count
            
        }else if section == 5 {
            
            return self.xiangmujiansheArray.count
            
            
        }else if section == 6 {
            
            return self.yuguxiaoyiArray.count
            
        }else if section == 7 {
            
            return self.shijixiaoyiArray.count
            
        }else  {
            return 1
            
        }
    }
    
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        
        if indexPath.section == 1{
            if indexPath.row == 3{
                return 100
            }else{
                return 40
            }
        }else if indexPath.section == 3{
            if indexPath.row == 9{
                if self.Photoimages.count == 0{
                    return 0
                }else if self.Photoimages.count <= 3{
                    return 70
                }else if self.Photoimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else if indexPath.row == 11{
                if self.xinwenimages.count == 0{
                    return 0
                }else if self.xinwenimages.count <= 3{
                    return 70
                }else if self.xinwenimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else{
                return 40
            }
        }else if indexPath.section == 6{
            if indexPath.row == 9 {
                if self.chanpinimages.count == 0{
                    return 0
                }else if self.chanpinimages.count <= 3{
                    return 70
                }else if self.chanpinimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else{
                return 40
            }
            
        }else if indexPath.section == 5{
            if indexPath.row == 7{
                if self.kaigongimages.count == 0{
                    return 0
                }else if self.kaigongimages.count <= 3{
                    return 70
                }else if self.kaigongimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
                
            }else if indexPath.row == 9{
                if self.xiangmuPhotoimages.count == 0{
                    return 0
                }else if self.xiangmuPhotoimages.count <= 3{
                    return 70
                }else if self.xiangmuPhotoimages.count <= 6{
                    return 140
                }else{
                    return 210
                }
            }else{
                return 40
            }
            
        }else if indexPath.section == 8{
            
            return 60
        
        }else if indexPath.section == 7{
            if indexPath.row == 4{
                if xiangmuString == "在谈"{
                    return 40
                }else{
                    return 0
                }
            }else{
                return 40
            }
        }
        else{
            return 40
        }
        
        
        
        
    }
    
    
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        
        if section == 0 {
            return 0
        }
        

        
        if section == 8 {
            if self.xiangmuString == "投产"{
                return 0
            }else{
                return 40
            }
        }
        
        
        
        return 40
        
    }
    
    //返回分区头部视图
    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        
        
        
        if section  == 1 {
            
            
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            
            let titleLabel = UILabel()
            titleLabel.text = "项目投资方"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 10, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
        }else if section == 2 {
            
            
            
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "市内合作方"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
        }else if section == 3 {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目进展过程中需要解决的问题"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
        }else if section == 4 {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目前置手续办理情况"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
        }else if section == 5 {
            
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目建设进度"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
        }else if section == 6 {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "项目建设内容及投产前预估效益"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
        }else if section == 7 {
            
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "投产后实际效益(投产后于每年12月填写)"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
        }else {
            let headerView = UIView()
            headerView.backgroundColor = UIColor.white
            let titleLabel = UILabel()
            titleLabel.text = "办理人"
            titleLabel.textColor = UIColor.gray
            titleLabel.sizeToFit()
            titleLabel.frame = CGRect(x: 10, y: 20, width:self.view.frame.size.width - 10, height: 20)
            headerView.addSubview(titleLabel)
            return headerView
            
            
        }
        
    }
    @objc func xiangmushengshixianButtonClick(){
        CGXPickerView.showStringPicker(withTitle: "选择省市县", dataSource: ["省","市","县"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xiangmushengshixianString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 1, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            
            
            print(selectRow!)
            
        }
    }
    
    @objc func jinduButtonClick() {
        

        
        CGXPickerView.showStringPicker(withTitle: "项目进度", dataSource: ["在谈","签约","履约","开工","投产"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xiangmuString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 0, section: 0)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            self.tableView.reloadData()
            
            print(selectRow!)
            
        }
    }
    @objc func jinduButtonClick1() {
        

        
        
        CGXPickerView.showStringPicker(withTitle: "是否国内", dataSource: ["国内","国外",], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.guoneiString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 1, section: 1)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            
            
            let indexPaths: IndexPath = IndexPath.init(row: 2, section: 1)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
    }
    @objc func shineiButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "项目合作方", dataSource: ["政府及其部门","商协会","中介机构","企业","个人"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.shinei = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 0, section: 2)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            print(selectRow!)
            
        }
        
        
        
    }
    //单位性质
    @objc func xingzhiButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "单位性质", dataSource: ["政府机关","事业","央企","省属企业","地市州企业","民企","混合制企业","个人"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xingzhi = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 2, section: 2)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    //单位地址
    @objc func danweizhidiButtonClick(){
        
        let touzifangshenVC =  touzifangshenViewController()
        
        touzifangshenVC.hezuofang = "合作方"
        
        self.navigationController?.pushViewController(touzifangshenVC , animated: true)
        
        
        
    }
    //手续
    @objc func shouxuButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.gongshangqingkuangStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 0, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 1, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    //立项审批
    @objc func shouxuButtonClick1(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.lixiangshenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 2, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            
            let indexPaths: IndexPath = IndexPath.init(row: 3, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    //环保审批
    @objc func shouxuButtonClick2(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.huanbaoshenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 4, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 5, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    
    //用地审批
    @objc func shouxuButtonClick3(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.yongdishenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 6, section: 4)
            
            
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            
            let indexPaths: IndexPath = IndexPath.init(row: 7, section:4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    //规划审批
    @objc func shouxuButtonClick4(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.guihuashenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 8, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 9, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    //建设审批
    @objc func shouxuButtonClick5(){
        
        CGXPickerView.showStringPicker(withTitle: "办理情况", dataSource: ["完成","在办","不能办"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.jiansheshenpiStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 10, section: 4)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            let indexPaths: IndexPath = IndexPath.init(row: 11, section: 4)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
            print(selectRow!)
            
        }
        
    }
    
    
    //产业类别
    @objc func chanyeButtonClick(){
        
        
        CGXPickerView.showStringPicker(withTitle: "产业类别", dataSource: ["高原特色农业和生物资源深加工产业","有色金属深加工和液态金属产业","军民融合现代装备制造产业","精细化工产业","现代商贸物流产业","文化旅游和高原体育产业","教育类项目","医疗卫生类项目","其他产业"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.chnayeleibieStrig = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 5, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
            print(selectRow!)
            
        }
        
        
    }
    
    
    
    @objc func gengxinshijianButtonClick(){
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.gengxinString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 3, section: 7)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func tuisongButtonClick(){
        CGXPickerView.showStringPicker(withTitle: "是否可行", dataSource: ["可行","不可行"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            
            self.tuisong = selectValue as? String
            
            //            let indexPath: IndexPath = IndexPath.init(row: 4, section: 7)
            
            self.tableView.reloadData()
            
        }
    }
    
    
    @objc func wubaiButtonClick(){
        
        CGXPickerView.showStringPicker(withTitle: "是否500强", dataSource: ["世界500强","中国500强","民营500强","高新技术企业","否"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.wubaiString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 4, section: 1)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
        }
    }
    @objc func  kaigongshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.xiangmukaigongshijianString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 4, section: 5)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func  lvxingshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.xiangmulvxingshijianString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 13, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func touchanshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.xiangmutouchanshijianString = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 6, section: 6)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    @objc func  qianyueshijianButtonClick(){
        //获取当前时间
        let now = Date()
        
        // 创建一个日期格式器
        let dformatter = DateFormatter()
        dformatter.dateFormat = "yyyy年MM月dd日 HH:mm:ss"
        print("当前日期时间：\(dformatter.string(from: now))")
        
        
        let dateString = dformatter.string(from: now)
        
        
        CGXPickerView.showDatePicker(withTitle: "选择时间", dateType: UIDatePickerMode.date, defaultSelValue: nil, minDateStr: "1900-01-01 00:00:00", maxDateStr: dateString, isAutoSelect: true, manager: nil) { (selectValue) in
            print("--------\(selectValue!)")
            
            
            self.qianyueStrig = selectValue!
            
            let indexPath: IndexPath = IndexPath.init(row: 3, section: 3)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
            
        }
    }
    
    @objc func touzifangButtonClick(){
        
        
        
        
        
        let touzifangshenVC =  touzifangshenViewController()
        touzifangshenVC.hezuofang = "投资方"
        self.navigationController?.pushViewController(touzifangshenVC , animated: true)
        

    }
    
    @objc func gongchengjiduButtonClick(){
        CGXPickerView.showStringPicker(withTitle: "工程进度", dataSource: ["征地拆迁阶段","三通一平阶段","基础工程建设阶段","主体工程建设阶段","设备安装调试阶段"], defaultSelValue: nil, isAutoSelect: false, manager: nil) { (selectValue, selectRow) in
            
            print(selectValue!)
            
            self.xiangmuwanchenggongchengString = selectValue as? String
            
            
            let indexPath: IndexPath = IndexPath.init(row: 2, section: 5)
            
            self.tableView.reloadRows(at: [indexPath], with: .fade)
        }
    }
    
    
    /**********************代理*/
    
    
    func textFieldDidEndEditing(_ textField: UITextField) {
        print("已经结束编辑")
        
        if textField.tag == 1001{
            
            self.xiangmumingchengString = textField.text
        }else if textField.tag == 1002{
            self.xiangmujianjieString = textField.text
        }else if textField.tag == 1003{
            self.duijieqingkuangString = textField.text
            
        }else if textField.tag == 1010{
            self.xiangmufangmingziString = textField.text
        }else if textField.tag == 1012{
            self.guowaidizhiString = textField.text
        }
            
            
        else if textField.tag == 1013{
            self.xiangmufanglianxirenString = textField.text
        }else if textField.tag == 1014{
            self.xiangmufangdianhuaString = textField.text
        }else if textField.tag == 1021{
            self.shineixiangmumingchengString = textField.text
        }else if textField.tag == 1024{
            self.shineidanweifuzerenString = textField.text
        }else if textField.tag == 1025{
            self.shineilianxirenString = textField.text
        }else if textField.tag == 1026{
            self.shineilianxirendianhuaString = textField.text
        }else if textField.tag == 1027{
            self.shineiyindaorenString = textField.text
        }else if textField.tag == 1028{
            self.shineiyindaorendianhuaString = textField.text
        }else if textField.tag == 1030{
            self.xiangmuwentimiaoshuString = textField.text
        }else if textField.tag == 1032{
            self.xiangmubumenmingchengString = textField.text
        }else if textField.tag == 1034{
            self.xiangmuxieyitouzieString = textField.text
        }else if textField.tag == 1036{
            self.xiangmujianshejibenString = textField.text
        }else if textField.tag == 1037{
            self.xiangmujianshediString = textField.text
        }else if textField.tag == 10312{
            self.xiangmutouzixieyishuString = textField.text
            
        }
            //                else if textField.tag == 10313{
            //                    self.xiangmulvxingshijianString = textField.text
            //                }
        else if textField.tag == 10314{
            self.xiangmuleijidaoweizijinString = textField.text
        }else if textField.tag == 10315{
            self.xiangmudangniandaoweizijinString = textField.text
        }else if textField.tag == 10316{
            self.xiangmunaruleijidaoweizijinString = textField.text
        }else if textField.tag == 10317{
            self.xiangmunarudangniandaoweizijinString = textField.text
        }else if textField.tag == 10318{
            self.xiangmudaoweizijincailiaoString = textField.text
        }else if textField.tag == 1041{
            self.gongshangpifuString = textField.text
        }else if textField.tag == 1043{
            self.lixiangpifuString = textField.text
        }else if textField.tag == 1045{
            self.huanbaopifuString = textField.text
        }else if textField.tag == 1047{
            self.yongdipifuString = textField.text
        }else if textField.tag == 1049{
            self.guihuapifuString = textField.text
        }else if textField.tag == 10410{
            self.jianshepifuString = textField.text
        }else if textField.tag == 1050{
            self.xiangmuwanchengniandujihuaString = textField.text
        }else if textField.tag == 1051{
            self.xiangmuwanchengniandushiwujihuaString = textField.text
        }else if textField.tag == 1053{
            self.xiangmutuijinjihuaString = textField.text
        }else if textField.tag == 1055{
            self.xiangmukaigongxukezhengString = textField.text
        }else if textField.tag == 1060{
            self.xiangmuzongzhandimianjiString = textField.text
        }else if textField.tag == 1061{
            self.xiangmuzongjianzhumianjiString = textField.text
        }else if textField.tag == 1062{
            self.xiangmutouziqiangduString = textField.text
        }else if textField.tag == 1063{
            self.xiangmujiuyerenshuString = textField.text
        }else if textField.tag == 1064{
            self.xiangmunianzongchanzhiString = textField.text
        }else if textField.tag == 1065{
            self.xiangmunianshangshuifeizongeString = textField.text
        }else if textField.tag == 1067{
            self.xiangmujungongyanshouString = textField.text
        }else if textField.tag == 1070{
            self.touchanhoujiuyerenshu = textField.text
        }else if textField.tag == 1071{
            self.touchannianchanzongzhi = textField.text
        }else if textField.tag == 1072{
            self.nianshangshuifeizonge = textField.text
        }
        
    }
    
    
    
    
    /**********************单元格*/
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        
        
        //项目进度
        if indexPath.section == 0 {
            
            
            if indexPath.row == 0 {
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
                if self.xiangmuString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmuString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(jinduButtonClick), for: .touchUpInside)
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
            }
            else if indexPath.row == 1 {
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1001
                
                
                
                
                if self.xiangmumingchengString == nil{
                    cell.titleTextField.placeholder = "请输入项目名称"
                }else{
                    cell.titleTextField.text = self.xiangmumingchengString
                }
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 2 {
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1002
                if self.xiangmujianjieString == nil{
                    cell.titleTextField.placeholder = "请输入项目简介"
                }else{
                    cell.titleTextField.text = self.xiangmujianjieString
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.nameArray[indexPath.row]
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1003
                if self.duijieqingkuangString == nil{
                    cell.titleTextField.placeholder = "请输入对接情况"
                }else{
                    cell.titleTextField.text = self.duijieqingkuangString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }
            
            
            
            //项目投资方
        }
        else if indexPath.section == 1{
            
            
            
            if indexPath.row == 0{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmutouzifangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1010
                if self.xiangmufangmingziString == nil{
                    cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.xiangmufangmingziString
                }
                
                
                
                return cell
                
            }else if indexPath.row == 1 {
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.xiangmutouzifangArray[indexPath.row]
                if self.guoneiString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.guoneiString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(jinduButtonClick1), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
            }else if indexPath.row == 2 {
                
                
                
                if self.guoneiString == nil || self.guoneiString == "国内"{
                    
                    
                    let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                    cell.titleLbel.text = "国内投资方地址"
                    if self.touzifangshenName == nil {
                        cell.nameLbel.text = ""
                    }else{
                        cell.nameLbel.text = "\(self.touzifangshenName!)\(self.touzifangshiName!)\(self.touzifangxianName!)"
                    }
                    
                    cell.jinduButton.addTarget(self, action: #selector(touzifangButtonClick), for: .touchUpInside)
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    return cell
                    
                    
                }
                else{
                    
                    let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                    cell.titleLbel.text = "国外投资方地址"
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    cell.titleTextField.tag = 1012
                    cell.titleTextField.delegate = self
                    
                    
                    if self.guowaidizhiString == nil{
                        cell.titleTextField.placeholder = "请输入地址"
                    }else{
                        cell.titleTextField.text = self.guowaidizhiString
                    }
                    
                    
                    return cell
                }
                
                
                
            }else if indexPath.row == 3{
                let cell = lianxirenTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "lianxirenTableViewCell")
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                cell.nameTextField.delegate = self
                cell.nameTextField.tag = 1013
                cell.phoneTextField.delegate = self
                cell.phoneTextField.tag = 1014
                if self.xiangmufanglianxirenString == nil{
                    cell.nameTextField.placeholder = "请输入姓名"
                }else{
                    cell.nameTextField.text = self.xiangmufanglianxirenString
                }
                
                if self.xiangmufangdianhuaString == nil{
                    cell.phoneTextField.placeholder = "请输入手机号"
                }else{
                    cell.phoneTextField.text = self.xiangmufangdianhuaString
                }
                
                
                
                return cell
            }else{
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = "是否500强"
                if self.wubaiString  == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.wubaiString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(wubaiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
            }
            
            
            //2222222222222222222222222222市内合作方
        }
        else if indexPath.section == 2{
            
            
            
            
            if indexPath.row == 0{
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                if self.shinei == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.shinei
                }
                
                cell.jinduButton.addTarget(self, action: #selector(shineiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
            }
            else if  indexPath.row == 1{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1021
                if self.shineixiangmumingchengString == nil{
                    cell.titleTextField.placeholder = "请输入项目名称"
                }else{
                    cell.titleTextField.text = self.shineixiangmumingchengString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            else if  indexPath.row == 2{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                if self.xingzhi == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xingzhi
                }
                
                cell.jinduButton.addTarget(self, action: #selector(xingzhiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }
            else if  indexPath.row == 3{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                if self.hezuofangshenName == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.hezuofangshenName!
                }
                
                cell.jinduButton.addTarget(self, action: #selector(danweizhidiButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }
            else if  indexPath.row == 4{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1024
                if self.shineidanweifuzerenString == nil{
                    cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.shineidanweifuzerenString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if  indexPath.row == 5{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1025
                if self.shineilianxirenString == nil{
                    cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.shineilianxirenString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if  indexPath.row == 6{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1026
                if self.shineilianxirendianhuaString == nil{
                    cell.titleTextField.placeholder = "请输入电话"
                }else{
                    cell.titleTextField.text = self.shineilianxirendianhuaString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
                
            }
            else if  indexPath.row == 7{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1027
                if self.shineiyindaorenString == nil{
                    cell.titleTextField.placeholder = "请输入姓名"
                }else{
                    cell.titleTextField.text = self.shineiyindaorenString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shineihezuofangArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1028
                if self.shineiyindaorendianhuaString == nil{
                    cell.titleTextField.placeholder = "请输入电话"
                }else{
                    cell.titleTextField.text = self.shineiyindaorendianhuaString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            
            
            
            
            
            
            //3333****************************************************项目进展过程中需要的问题
            
            
        }
        else if indexPath.section == 3{
            
            
            if indexPath.row == 0{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1030
                if self.xiangmuwentimiaoshuString == nil{
                    cell.titleTextField.placeholder = "请输入问题描述"
                }else{
                    cell.titleTextField.text = self.xiangmuwentimiaoshuString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 1{
                
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                if self.xiangmushengshixianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmushengshixianString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(xiangmushengshixianButtonClick), for: .touchUpInside)
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                //                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                //                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                //
                //
                //
                //                cell.titleTextField.delegate = self
                //                cell.titleTextField.tag = 1031
                //                if self.xiangmushengshixianString == nil{
                //                    cell.titleTextField.placeholder = "请输入省市县"
                //                }else{
                //                    cell.titleTextField.text = self.xiangmushengshixianString
                //                }
                //
                //
                //                cell.selectionStyle = UITableViewCellSelectionStyle.none
                //
                //                return cell
                
            }else if indexPath.row == 2{
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1032
                if self.xiangmubumenmingchengString == nil{
                    cell.titleTextField.placeholder = "请输入部门名称"
                }else{
                    cell.titleTextField.text = self.xiangmubumenmingchengString
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 3{
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                if self.qianyueStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.qianyueStrig
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.jinduButton.addTarget(self, action: #selector(qianyueshijianButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
            }else if indexPath.row == 4{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1034
                if self.xiangmuxieyitouzieString == nil{
                    cell.titleTextField.placeholder = "请输入投资额"
                }else{
                    cell.titleTextField.text = self.xiangmuxieyitouzieString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if  indexPath.row == 5{
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                if self.chnayeleibieStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.chnayeleibieStrig
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                cell.jinduButton.addTarget(self, action: #selector(chanyeButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
            }else if indexPath.row == 6{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1036
                if self.xiangmujianshejibenString == nil{
                    cell.titleTextField.placeholder = "请输入基本内容"
                }else{
                    cell.titleTextField.text = self.xiangmujianshejibenString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 7{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1037
                if self.xiangmujianshediString == nil{
                    cell.titleTextField.placeholder = "请输入项目地"
                }else{
                    cell.titleTextField.text = self.xiangmujianshediString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if  indexPath.row == 8{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.jinzhanArray[indexPath.row]
                
                cell.jinduButton.addTarget(self, action: #selector(qianyueButtonClick), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 9{
                
                
                if Photoimages.count == 0{
                    let cell = PhotoImageViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoImageViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = PhotoImageViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoImageViewCell")
                    
                    
                    
                    cell.PhotoImageViewCell(model: self.Photoimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
                
            }
                
                
            else if  indexPath.row == 10{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.jinzhanArray[indexPath.row]
                
                cell.jinduButton.addTarget(self, action: #selector(xinwenButtonClick), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 11 {
                
                if Photoimages.count == 0{
                    let cell = xinwenImageViewTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xinwenImageViewTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = xinwenImageViewTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xinwenImageViewTableViewCell")
                    
                    
                    
                    cell.xinwenImageViewTableViewCell(model: self.xinwenimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
                
            }else if indexPath.row == 12{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10312
                if self.xiangmutouzixieyishuString == nil{
                    cell.titleTextField.placeholder = "请输入投资协议书"
                }else{
                    cell.titleTextField.text = self.xiangmutouzixieyishuString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 13{
                
                
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                
                
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                if self.xiangmulvxingshijianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmulvxingshijianString
                }
                
                
                
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.jinduButton.addTarget(self, action: #selector(lvxingshijianButtonClick), for: .touchUpInside)
                
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 14{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10314
                if self.xiangmuleijidaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入累计资金"
                }else{
                    cell.titleTextField.text = self.xiangmuleijidaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 15{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10315
                if self.xiangmudangniandaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入到位资金"
                }else{
                    cell.titleTextField.text = self.xiangmudangniandaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 16{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10316
                if self.xiangmunaruleijidaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入累计资金"
                }else{
                    cell.titleTextField.text = self.xiangmunaruleijidaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 17{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10317
                if self.xiangmunarudangniandaoweizijinString == nil{
                    cell.titleTextField.placeholder = "请输入到位资金"
                }else{
                    cell.titleTextField.text = self.xiangmunarudangniandaoweizijinString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.jinzhanArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10318
                if self.xiangmudaoweizijincailiaoString == nil{
                    cell.titleTextField.placeholder = "请输入资金证明"
                }else{
                    cell.titleTextField.text = self.xiangmudaoweizijincailiaoString
                }
                
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            
            
            //项目z前置手续办理情况
        }else if indexPath.section == 4{
            
            
            if indexPath.row == 0{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                if self.gongshangqingkuangStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.gongshangqingkuangStrig
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
            }else if indexPath.row == 1{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                
                if self.gongshangqingkuangStrig == nil || self.gongshangqingkuangStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.gongshangqingkuangStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.gongshangqingkuangStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1041
                if self.gongshangpifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.gongshangpifuString
                }
                
                
                
                
                
                
                return cell
            }else if indexPath.row == 2{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                if self.lixiangshenpiStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.lixiangshenpiStrig
                }
                
                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick1), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 3{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.lixiangshenpiStrig == nil || self.lixiangshenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.lixiangshenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.lixiangshenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                    
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1043
                if self.lixiangpifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.lixiangpifuString
                }
                
                return cell
            }else if indexPath.row == 4{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                if self.huanbaoshenpiStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.huanbaoshenpiStrig
                }
                
                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick2), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else if indexPath.row == 5{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.huanbaoshenpiStrig == nil || self.huanbaoshenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.huanbaoshenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.huanbaoshenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1045
                if self.huanbaopifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.huanbaopifuString
                }
                
                return cell
            }else if indexPath.row == 6{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                if self.yongdishenpiStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.yongdishenpiStrig
                }
                
                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick3), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 7{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.yongdishenpiStrig == nil || self.yongdishenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.yongdishenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.yongdishenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1047
                if self.yongdipifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.yongdipifuString
                }
                
                return cell
            }else if indexPath.row == 8{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                if self.guihuashenpiStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.guihuashenpiStrig
                }
                
                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick4), for: .touchUpInside)
                
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
            }else if indexPath.row == 9{
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                
                if self.guihuashenpiStrig == nil || self.guihuashenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.guihuashenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.guihuashenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1049
                if self.guihuapifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.guihuapifuString
                }
                
                return cell
                
            }else if indexPath.row == 10{
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                if self.jiansheshenpiStrig == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.jiansheshenpiStrig
                }
                
                cell.jinduButton.addTarget(self, action: #selector(shouxuButtonClick5), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.qingkuangArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.jiansheshenpiStrig == nil || self.jiansheshenpiStrig == "完成"{
                    cell.titleLbel.text = "批复文号"
                }else if self.jiansheshenpiStrig == "在办"{
                    cell.titleLbel.text = "在办部门"
                }else if self.jiansheshenpiStrig == "不能办"{
                    cell.titleLbel.text = "原因"
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 10410
                if self.jianshepifuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.jianshepifuString
                }
                
                return cell
            }
            
            
            
            
            
            
            //项目建设进度
            
            
        }else if indexPath.section == 5{
            
            if indexPath.row == 0 {
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1050
                if self.xiangmuwanchengniandujihuaString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuwanchengniandujihuaString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if  indexPath.row == 1{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1051
                if self.xiangmuwanchengniandushiwujihuaString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuwanchengniandushiwujihuaString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if  indexPath.row == 2{
                //哈哈
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                if self.xiangmuwanchenggongchengString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmuwanchenggongchengString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                cell.jinduButton.addTarget(self, action: #selector(gongchengjiduButtonClick), for: .touchUpInside)
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
            }else if indexPath.row == 3{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1053
                if self.xiangmutuijinjihuaString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmutuijinjihuaString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 4{
                
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                
                
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                if self.xiangmukaigongshijianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmukaigongshijianString
                }
                
                
                
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.jinduButton.addTarget(self, action: #selector(kaigongshijianButtonClick), for: .touchUpInside)
                
                
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
                
            }else if indexPath.row == 5{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1055
                if self.xiangmukaigongxukezhengString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmukaigongxukezhengString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }
            else if indexPath.row == 6{
                
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.xiangmujiansheArray[indexPath.row]
                cell.jinduButton.addTarget(self, action: #selector(kaigongButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
                
            }else if indexPath.row == 7{
                
                
                if kaigongimages.count == 0{
                    let cell = kaigongyishiTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "kaigongyishiTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = kaigongyishiTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "kaigongyishiTableViewCell")
                    
                    
                    
                    cell.kaigongyishiTableViewCell(model: self.kaigongimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
                
                
            }else if indexPath.row == 8{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.xiangmujiansheArray[indexPath.row]
                
                cell.jinduButton.addTarget(self, action: #selector(jinzhanshijingButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else {
                if xiangmuPhotoimages.count == 0{
                    let cell = xiangmuPhotoTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmuPhotoTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = xiangmuPhotoTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmuPhotoTableViewCell")
                    
                    
                    
                    cell.xiangmuPhotoTableViewCell(model: self.xiangmuPhotoimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
            }
            
            //项目建设内容及投产前预估效益
        }else if indexPath.section == 6{
            
            
            if indexPath.row == 0{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1060
                if self.xiangmuzongzhandimianjiString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuzongzhandimianjiString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 1{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1061
                if self.xiangmuzongjianzhumianjiString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmuzongjianzhumianjiString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 2{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1062
                if self.xiangmutouziqiangduString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmutouziqiangduString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 3{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1063
                if self.xiangmujiuyerenshuString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmujiuyerenshuString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 4{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1064
                if self.xiangmunianzongchanzhiString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmunianzongchanzhiString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 5{
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1065
                if self.xiangmunianshangshuifeizongeString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmunianshangshuifeizongeString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
            }else if indexPath.row == 6{
                
                
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                if self.xiangmutouchanshijianString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.xiangmutouchanshijianString
                }
                
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                
                
                
                cell.jinduButton.addTarget(self, action: #selector(touchanshijianButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
                //                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                //                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                //
                //
                //
                //                cell.titleTextField.delegate = self
                //                cell.titleTextField.tag = 1066
                //                if self.xiangmutouchanshijianString == nil{
                //                    cell.titleTextField.placeholder = "请输入信息"
                //                }else{
                //                    cell.titleTextField.text = self.xiangmutouchanshijianString
                //                }
                
                //                cell.selectionStyle = UITableViewCellSelectionStyle.none
                //
                //                return cell
                
            }else if indexPath.row == 7{
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.yuguxiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1067
                if self.xiangmujungongyanshouString == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.xiangmujungongyanshouString
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }else if indexPath.row == 8{
                let cell = PhotoCellTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "PhotoCellTableViewCell")
                cell.nameLbel.text = self.yuguxiaoyiArray[indexPath.row]
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                cell.jinduButton.addTarget(self, action: #selector(chanpinxiaxianButtonClick), for: .touchUpInside)
                
                if self.xiangmuString == "在谈"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                if self.xiangmuString == "开工"{
                    cell.nameLbel.textColor = UIColor.gray
                    
                    cell.jinduButton.isHidden = true
                    
                }
                return cell
            }else {
                
                if chanpinimages.count == 0{
                    let cell = chanpinxiaxianTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "chanpinxiaxianTableViewCell")
                    
                    
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    
                    return cell
                    
                }else{
                    
                    let cell = chanpinxiaxianTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "chanpinxiaxianTableViewCell")
                    
                    
                    
                    cell.chanpinxiaxianTableViewCell(model: self.chanpinimages)
                    
                    
                    cell.delegate = self
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                    
                    return cell
                }
                
            }
            
            //投产后实际效益
        }else if indexPath.section == 7{
            
            
            if indexPath.row == 0
            {
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1070
                if self.touchanhoujiuyerenshu == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.touchanhoujiuyerenshu
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if indexPath.row == 1
            {
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                
                
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1071
                if self.touchannianchanzongzhi == nil
                {
                    cell.titleTextField.placeholder = "请输入信息"
                }else
                {
                    cell.titleTextField.text = self.touchannianchanzongzhi
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "履约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if indexPath.row == 2
            {
                
                
                let cell = LuruTextFirldTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "LuruTextFirldTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                
                cell.titleTextField.delegate = self
                cell.titleTextField.tag = 1072
                if self.nianshangshuifeizonge == nil{
                    cell.titleTextField.placeholder = "请输入信息"
                }else{
                    cell.titleTextField.text = self.nianshangshuifeizonge
                }
                if self.xiangmuString == "在谈"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                if self.xiangmuString == "签约"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                if self.xiangmuString == "开工"{
                    cell.titleLbel.textColor = UIColor.gray
                    
                    cell.titleTextField.isHidden = true
                    
                }
                
                
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                
                return cell
                
            }
            else if indexPath.row == 3
            {
                let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                if self.gengxinString == nil {
                    cell.nameLbel.text = ""
                }else{
                    cell.nameLbel.text = self.gengxinString
                }
                
                cell.jinduButton.addTarget(self, action: #selector(gengxinshijianButtonClick), for: .touchUpInside)
                cell.selectionStyle = UITableViewCellSelectionStyle.none
                return cell
                
                
                
            }
            else
            {
                
              
                    let cell = xiangmujinduTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "xiangmujinduTableViewCell")
                    cell.titleLbel.text = self.shijixiaoyiArray[indexPath.row]
                    if self.tuisong == nil {
                        cell.nameLbel.text = ""
                    }else{
                        cell.nameLbel.text = self.tuisong
                    }
                    
                    cell.jinduButton.addTarget(self, action: #selector(tuisongButtonClick), for: .touchUpInside)
                    cell.selectionStyle = UITableViewCellSelectionStyle.none
                   
              
                     return cell
                    
          
                
            }
            
            
            
        } else  {
            //办理人
            let cell = banlirenTableViewCell(style:UITableViewCellStyle.default, reuseIdentifier: "banlirenTableViewCell")
            cell.banlirenButton.tag = 88
            
            cell.selectionStyle = UITableViewCellSelectionStyle.none
            
            if self.xiangmuString == "投产"{
                cell.isHidden = true
            }
            
            if self.namestring == nil
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden = true
                
                
                
            }else
            {
                cell.banlirenButton.addTarget(self, action: #selector(banlirenButtonClick(button:)), for: .touchUpInside)
                cell.nameLabel.isHidden  = false
                cell.nameLabel.text = self.namestring!
                
                if self.photostring == ""
                {
                    cell.banlirenButton.setImage(UIImage.init(named: "morentouxiang"), for: .normal)
                }
                else
                {
                    let url : NSURL = NSURL(string: "http://wwwqjzsyzcscom.aykj.net.cn/api\(self.photostring!)")!
                    
                    let data : NSData = NSData(contentsOf:url as URL)!
                    let images = UIImage(data:data as Data, scale: 1.0)
                    
                    cell.banlirenButton.setImage(images!, for: .normal)
                }
                
            }
            return cell
            
        }
    }
    

    
    //开工仪式照片
    @objc func   kaigongButtonClick() {
        print(" kaigongButtonClick")
        
        self.kaigongimages.removeAll()
        
        self.Besa64kaigongimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.kaigongimages.append(image!)
                    
                    
                    let image = self.kaigongimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64kaigongimage.append(base64!)
                    
                    
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 6, section:5)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
    }
    
    
    
    //项目进度实景照片
    @objc func  jinzhanshijingButtonClick() {
        print("jinzhanshijingButtonClick")
        
        self.xiangmuPhotoimages.removeAll()
        
        self.Besa64xiangmuPhotoimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.xiangmuPhotoimages.append(image!)
                    
                    
                    
                    let image = self.xiangmuPhotoimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64xiangmuPhotoimage.append(base64!)
                    
                    
                    
                    
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 9, section:5)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
    }
    //产品下线照片
    @objc func  chanpinxiaxianButtonClick() {
        print("chanpinxiaxianButtonClick")
        
        self.chanpinimages.removeAll()
        self.Besa64chanpinimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.chanpinimages.append(image!)
                    
                    
                    
                    let image = self.chanpinimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64chanpinimage.append(base64!)
                    
                    
                    
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 9, section:6)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
        
    }
    
    //新闻报道
    @objc func  xinwenButtonClick() {
        print("xinwenButtonClick")
        
        self.xinwenimages.removeAll()
        
        self.Besa64xinwenimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            print("共选择了\(assets.count)张图片，分别如下：")
            
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    print(image!)
                    
                    self.xinwenimages.append(image!)
                    
                    
                    
                    let image = self.xinwenimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64xinwenimage.append(base64!)
                    
                    
                    
                    
                    
                })
                
                
            }
            let indexPaths: IndexPath = IndexPath.init(row: 11, section:3)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
        }
    }
    //签约h照片
    @objc func  qianyueButtonClick() {
        
        
        self.Photoimages.removeAll()
        
        self.Besa64Photoimage.removeAll()
        
        _ = self.presentHGImagePicker(maxSelected:9) { (assets) in
            //结果处理
            
            let options = PHImageRequestOptions()
            
            options.isSynchronous = true
            
            options.deliveryMode = .highQualityFormat
            
            options.resizeMode = .fast
            
            
            for i in 0..<assets.count {
                
                
                let asset = assets[i]
                
                PHImageManager.default().requestImage(for: asset, targetSize: CGSize(width: 750, height: 1920), contentMode: PHImageContentMode.default, options: options, resultHandler: { (image, value) in
                    
                    
                    
                    self.Photoimages.append(image!)
                    
                    
                    
                    
                    let image = self.Photoimages[i] as? UIImage
                    
                    
                    
                    
                    
                    let data  = UIImageJPEGRepresentation(image!, 0.1)
                    
                    let base64 = data?.base64EncodedString(options: .endLineWithLineFeed)
                    
                    
                    
                    self.Besa64Photoimage.append(base64!)
                    
                })
                
            }
            
            
            
            
            
            let indexPaths: IndexPath = IndexPath.init(row: 9, section:3)
            
            self.tableView.reloadRows(at: [indexPaths], with: .fade)
            
        }
        
        
    }
    
    
    
    @objc func  banlirenButtonClick(button:UIButton) {
        
        if button.tag == 88 {
            
            print(button.tag)
            let banVC =  banlirenViewController()
            banVC.ButtonTag = button.tag
            banVC.xiangmu = "项目"
            banVC.zhiwei = "办理人"
            self.navigationController?.pushViewController(banVC, animated: true)
        }
        
    }
    
    
    
    
}

